{"record":{"id":"d0619c4a1e065317","repo":"BerriAI/litellm","slug":"file-id-object-does-not-match-the-configured-stora","errorCode":null,"errorMessage":"file_id object does not match the configured storage prefix","messagePattern":"file_id object does not match the configured storage prefix","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/litellm_core_utils/cloud_storage_security.py","lineNumber":164,"sourceCode":"    if \"/\" not in full_path:\n        raise ValueError(\"file_id must include a cloud storage object name\")\n\n    bucket_name, object_name = full_path.split(\"/\", 1)\n    configured_bucket, configured_prefix = split_configured_cloud_bucket_name(configured_bucket_name)\n    if bucket_name != configured_bucket:\n        raise ValueError(\"file_id bucket does not match the configured storage bucket\")\n\n    _validate_cloud_object_path(object_name)\n    allowed_prefixes = tuple(allowed_object_prefixes)\n    if configured_prefix:\n        allowed_prefixes = tuple(f\"{configured_prefix.rstrip('/')}/{prefix}\" for prefix in allowed_prefixes)\n\n    if object_name.startswith(allowed_prefixes):\n        return bucket_name, object_name\n\n    if allow_legacy_cloud_file_ids:\n        if configured_prefix and not object_name.startswith(f\"{configured_prefix.rstrip('/')}/\"):\n            raise ValueError(\"file_id object does not match the configured storage prefix\")\n        return bucket_name, object_name\n\n    raise ValueError(\"file_id must reference a LiteLLM-managed storage object\")\n","sourceCodeStart":146,"sourceCodeEnd":168,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/litellm_core_utils/cloud_storage_security.py#L146-L168","documentation":"Validation guard: the object name extracted from the file_id URI does not start with any allowed prefix (the configured bucket prefix plus allowed_object_prefixes), meaning the object lies outside the paths LiteLLM permits to resolve. Fires when a file_id references an object outside managed prefixes.","triggerScenarios":"Thrown at litellm/litellm_core_utils/cloud_storage_security.py:164 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a file_id whose object path starts with the configured storage prefix.","Re-upload the file via LiteLLM so it lands under the managed prefix."],"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-23T08:17:48.524Z"}