{"record":{"id":"96dbf8995a5f0b6a","repo":"unslothai/unsloth","slug":"requested-backend-request-but-the-installer-prod","errorCode":null,"errorMessage":"requested {backend_request} but the installer produced {new_backend or 'an unknown backend'}","messagePattern":"requested (.+?) but the installer produced (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"studio/backend/utils/llama_cpp_update.py","lineNumber":691,"sourceCode":"                    \"backend switch must preserve \"\n                    f\"{repo}@{pin_release_tag}, but installer produced \"\n                    f\"{new_repo or 'an unknown repository'}@{new_tag or 'an unknown release'}\"\n                )\n        elif pin_release_tag and new_tag and new_repo == repo and new_tag != pin_release_tag:\n            raise RuntimeError(f\"pinned release {pin_release_tag} but installer produced {new_tag}\")\n\n        if backend_request is not None:\n            if new_backend is None:\n                raise RuntimeError(\n                    f\"requested {backend_request} but the installed backend is unknown\"\n                )\n            if new_backend_request != backend_request:\n                raise RuntimeError(\n                    f\"requested {backend_request} but the installer recorded \"\n                    f\"{new_backend_request or 'an unknown selection'}\"\n                )\n            if backend_request != \"auto\" and new_backend != backend_request:\n                raise RuntimeError(\n                    f\"requested {backend_request} but the installer produced \"\n                    f\"{new_backend or 'an unknown backend'}\"\n                )\n\n        logger.info(\"llama update: success\", to_tag = new_tag, backend = new_backend)\n        reload_hint = \" Reload your model to use it.\" if model_was_active else \"\"\n        return {\n            \"to_tag\": new_tag,\n            \"backend\": new_backend,\n            \"reload_required\": model_was_active,\n            \"message\": (\n                f\"llama.cpp is now running on {new_backend or backend_request}.{reload_hint}\"\n                if backend_request is not None\n                else f\"Updated llama.cpp to {new_tag}.{reload_hint}\"\n            ),\n        }\n    except _flow.InstallerExit as exc:\n        # Raw \"installer exited 4: <log tail>\" says nothing actionable in the UI.","sourceCodeStart":673,"sourceCodeEnd":709,"githubUrl":"https://github.com/unslothai/unsloth/blob/203007d19051dcd2ae33876786d117c99f6b0368/studio/backend/utils/llama_cpp_update.py#L673-L709","documentation":"The strongest backend check: for any explicit (non-'auto') backend_request, marker_backend(new_marker) — the backend the installed binary actually serves — must equal it. Unlike the previous check (recorded selection), this validates observed reality, catching an installer that accepted the request but shipped a binary compiled for a different backend.","triggerScenarios":"run_update(backend_request='cuda') where the downloaded prebuilt artifact turns out to be the Vulkan build (mis-published release assets, wrong asset picked per platform), or a 'vulkan' request yielding a CUDA-linked binary. 'auto' requests skip this check by design.","commonSituations":"Upstream release assets mislabeled or renamed so the platform/asset heuristic picks the wrong archive; CDN caching serving a stale artifact; a fork repo whose asset layout differs from ggml-org's.","solutions":["Retry the update with force_refresh so cached release metadata and assets are re-fetched","Re-run with backend_request='auto' to let the installer choose the artifact it can verify","Check the upstream release page and confirm an asset for your requested backend and platform exists; if not, request a backend that is published","Pin around a mis-published release: set pin_release_tag to the last known-good release"],"exampleFix":"# before\nrun_update(backend_request='vulkan')\n# RuntimeError: requested vulkan but the installer produced cuda\n\n# after\nrun_update(backend_request='vulkan', force_refresh=True)\n# or fall back\nrun_update(backend_request='auto')","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    result = run_update(backend_request=sel)\nexcept RuntimeError as exc:\n    if 'installer produced' in str(exc) and sel != 'auto':\n        result = run_update(backend_request='auto')  # fall back to installer's choice\n        warn_user(f\"{sel} unavailable; using {result['backend']}\")\n    else:\n        raise","preventionTips":["Confirm the upstream release ships an artifact for your backend+platform before requesting it","Force-refresh release metadata after upstream asset changes"],"tags":["llama-cpp","runtime-installer","gpu-backend","artifact-mismatch"],"backgroundTag":null,"analyzedSha":"203007d19051dcd2ae33876786d117c99f6b0368","analyzedAt":"2026-08-15T02:48:39.846Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}