{"record":{"id":"8b9bd6973a60ce00","repo":"BerriAI/litellm","slug":"the-caller-does-not-have-access-to-this-managed-r","errorCode":null,"errorMessage":"The caller does not have access to this managed {resource_kind} id.","messagePattern":"The caller does not have access to this managed (.+?) id\\.","errorType":"http","errorClass":"HTTPException","httpStatus":403,"severity":"error","filePath":"litellm/proxy/openai_files_endpoints/common_utils.py","lineNumber":977,"sourceCode":"                f\"{resource_kind} was created.\"\n            ),\n        )\n\n    if not isinstance(managed_files_obj, ManagedResourceAccessChecker):\n        raise HTTPException(\n            status_code=500,\n            detail=\"Managed resource ownership validation is unavailable.\",\n        )\n\n    can_access: Final = (\n        await managed_files_obj.can_user_call_unified_file_id(resource_id, user_api_key_dict)\n        if resource_kind == \"file\"\n        else await managed_files_obj.can_user_call_unified_object_id(resource_id, user_api_key_dict)\n    )\n    if can_access:\n        return\n\n    raise HTTPException(\n        status_code=403,\n        detail=f\"The caller does not have access to this managed {resource_kind} id.\",\n    )\n\n\ndef _extract_model_param(request: \"Request\", request_body: dict) -> str | None:\n    \"\"\"\n    Extract model parameter from request.\n\n    Priority:\n    1. request_body.model\n    2. Query parameter (?model=)\n    3. Header (x-litellm-model)\n    \"\"\"\n    return request_body.get(\"model\") or request.query_params.get(\"model\") or request.headers.get(\"x-litellm-model\")\n\n\n# ============================================================================","sourceCodeStart":959,"sourceCodeEnd":995,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/openai_files_endpoints/common_utils.py#L959-L995","documentation":"HTTPException raised after the managed-file access check returns False: the caller's key/user does not own (or lack team access to) the managed file/object id they referenced, while require_managed_files is enabled. The request is denied to prevent cross-tenant access to another team's resource.","triggerScenarios":"Thrown at litellm/proxy/openai_files_endpoints/common_utils.py:977 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a managed resource id owned by your key/team/user, or ask an admin for access."],"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-14T00:17:10.932Z"}