{"record":{"id":"a27ef56994d74cbb","repo":"BerriAI/litellm","slug":"raw-provider-resource-kind-ids-cannot-be-used-wh","errorCode":null,"errorMessage":"Raw provider {resource_kind} ids cannot be used when require_managed_files is enabled in litellm_settings. Use the LiteLLM managed {resource_kind} id returned when the {resource_kind} was created.","messagePattern":"Raw provider (.+?) ids cannot be used when require_managed_files is enabled in litellm_settings\\. Use the LiteLLM managed (.+?) id returned when the (.+?) was created\\.","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"litellm/proxy/openai_files_endpoints/common_utils.py","lineNumber":954,"sourceCode":"    provider under shared credentials without any tenant check; knowing another tenant's provider\n    id would be enough to read, reuse, or destroy the object behind it.\n\n    Raises:\n        HTTPException: 400 for a raw id, 403 for an inaccessible managed id, or 500 when\n            ownership validation is unavailable.\n    \"\"\"\n    from fastapi import HTTPException\n\n    import litellm\n\n    if litellm.require_managed_files is not True:\n        return\n\n    if not resource_id:\n        return\n\n    if not _is_base64_encoded_unified_file_id(resource_id):\n        raise HTTPException(\n            status_code=400,\n            detail=(\n                f\"Raw provider {resource_kind} ids cannot be used when require_managed_files is enabled in \"\n                f\"litellm_settings. Use the LiteLLM managed {resource_kind} id returned when the \"\n                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)","sourceCodeStart":936,"sourceCodeEnd":972,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/openai_files_endpoints/common_utils.py#L936-L972","documentation":"Error \"Raw provider {resource_kind} ids cannot be used when require_managed_files is enabled in litellm_settings. Use the LiteLLM managed {resource_kind} id returned when the {resource_kind} was created.\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/proxy/openai_files_endpoints/common_utils.py:954 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use the LiteLLM managed resource id returned when the resource was created, not the raw provider id."],"exampleFix":null,"handlingStrategy":null,"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"}