{"record":{"id":"75776191e4efb838","repo":"BerriAI/litellm","slug":"the-model-model-id-does-not-exist-or-is-not-ac","errorCode":null,"errorMessage":"The model `{model_id}` does not exist or is not accessible","messagePattern":"The model `(.+?)` does not exist or is not accessible","errorType":"http","errorClass":"HTTPException","httpStatus":404,"severity":"error","filePath":"litellm/proxy/utils.py","lineNumber":7088,"sourceCode":"\n    Raises:\n        HTTPException: If the model is not accessible\n    \"\"\"\n    # Handle batch requests with comma-separated models\n    if \",\" in model_id:\n        models: Final = [m.strip() for m in model_id.split(\",\")]\n        inaccessible_models: Final = [m for m in models if m not in available_models]\n        if inaccessible_models:\n            raise HTTPException(\n                status_code=404,\n                detail=\"The following model(s) do not exist or are not accessible: {}\".format(\n                    \", \".join(inaccessible_models)\n                ),\n            )\n    else:\n        # Single model validation\n        if model_id not in available_models:\n            raise HTTPException(\n                status_code=404,\n                detail=f\"The model `{model_id}` does not exist or is not accessible\",\n            )\n\n\n_PRESERVED_NONE_FIELDS: Final[list[tuple[str, str]]] = [\n    (\"message\", \"content\"),  # null when tool_calls present (issue #6677)\n    (\"message\", \"role\"),  # always required by OpenAI spec\n    (\"delta\", \"content\"),  # null in streaming chunks\n]\n\n\ndef model_dump_with_preserved_fields(\n    obj: Any,\n    preserve_fields: list[str] | None = None,\n    exclude_unset: bool = True,\n) -> dict[str, object]:\n    \"\"\"","sourceCodeStart":7070,"sourceCodeEnd":7106,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/utils.py#L7070-L7106","documentation":"Single-model access check: the requested model_id is not in the caller's available_models list, meaning it is not deployed on this proxy or the key/team lacks permission. Returned as 404 so clients treat it as unknown/inaccessible rather than a transient error.","triggerScenarios":"Thrown at litellm/proxy/utils.py:7088 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the model_id exists in the proxy configuration and your key/team is allowed to access it."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}