{"record":{"id":"e7b67716e6ce384e","repo":"unslothai/unsloth","slug":"requested-backend-request-but-the-installer-reco","errorCode":null,"errorMessage":"requested {backend_request} but the installer recorded {new_backend_request or 'an unknown selection'}","messagePattern":"requested (.+?) but the installer recorded (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"studio/backend/utils/llama_cpp_update.py","lineNumber":686,"sourceCode":"\n        new_repo = (new_marker or {}).get(\"published_repo\")\n        if pin_release_tag and backend_request is not None:\n            if new_repo != repo or new_tag != pin_release_tag:\n                raise RuntimeError(\n                    \"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","sourceCodeStart":668,"sourceCodeEnd":704,"githubUrl":"https://github.com/unslothai/unsloth/blob/203007d19051dcd2ae33876786d117c99f6b0368/studio/backend/utils/llama_cpp_update.py#L668-L704","documentation":"Verifies the installer honored the exact backend selection string: marker_backend_request(new_marker) must equal the backend_request argument. It distinguishes the requested selection (what the user chose, recorded by the installer) from the resolved backend (what actually got installed), catching installer bugs or argument plumbing mistakes where the recorded selection differs from the request.","triggerScenarios":"run_update(backend_request='cuda') where the marker's recorded backend_request is 'auto' or 'vulkan' — an installer that ignored the flag, a request value not in the installer's accepted vocabulary, or a marker from an install started with different arguments.","commonSituations":"Frontend/backend argument mismatch after a UI change (button sends 'metal' but installer records 'auto'); testing with hand-crafted markers; concurrent update requests racing on one runtime.","solutions":["Retry the update ensuring nothing else is updating the runtime concurrently (close other Studio tabs/jobs)","Update Studio so the requester and installer share the same backend vocabulary","Inspect the marker JSON next to the binary to see what selection was recorded and reconcile it with your request","Reinstall without a backend_request (auto) to get back to a consistent state, then re-request"],"exampleFix":"# before\nrun_update(backend_request='cuda')\n# RuntimeError: requested cuda but the installer recorded auto\n\n# after: eliminate the concurrent/racy invocation, then\nrun_update(backend_request='cuda')  # marker records cuda, check passes","handlingStrategy":"try-catch","validationCode":"from utils.llama_cpp_update import read_install_marker, _find_binary, marker_backend_request\n\ndef recorded_matches(request: str) -> bool:\n    return marker_backend_request(read_install_marker(_find_binary())) == request","typeGuard":null,"tryCatchPattern":"try:\n    run_update(backend_request=sel)\nexcept RuntimeError as exc:\n    if 'installer recorded' in str(exc):\n        serialize_updates_with_lock()\n        run_update(backend_request=sel)","preventionTips":["Serialize update requests behind a lock or queue","Keep frontend/backend backend-vocabulary in sync ('cuda'|'vulkan'|'metal'|'auto')"],"tags":["llama-cpp","runtime-installer","backend-request","installer-mismatch"],"backgroundTag":null,"analyzedSha":"203007d19051dcd2ae33876786d117c99f6b0368","analyzedAt":"2026-08-15T02:48:39.846Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}