{"record":{"id":"27507027dba19f15","repo":"BerriAI/litellm","slug":"reducto-file-ids-are-not-accepted-through-the-p","errorCode":null,"errorMessage":"reducto:// file IDs are not accepted through the proxy OCR API; upload the file in the same request via multipart/form-data with a 'file' field, or pass an inline base64 data URI as the document URL.","messagePattern":"reducto:// file IDs are not accepted through the proxy OCR API; upload the file in the same request via multipart/form-data with a 'file' field, or pass an inline base64 data URI as the document URL\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/proxy/ocr_endpoints/endpoints.py","lineNumber":188,"sourceCode":"    if isinstance(doc, dict) and doc.get(\"type\") == \"file\":\n        raise ValueError(\n            \"document type 'file' is not supported through the JSON API. \"\n            \"To upload a local file, use multipart/form-data with a 'file' field. \"\n            \"For JSON requests, use 'document_url' or 'image_url' document types.\"\n        )\n\n    # Security: reject provider-native file IDs (e.g. reducto://) received via\n    # JSON. These IDs are not scoped to the LiteLLM proxy user/key, so an\n    # authenticated user who obtains another user's file ID could submit it\n    # here and receive the OCR result using the proxy's shared provider\n    # credentials. Force callers to upload fresh content per request via\n    # multipart/form-data or an inline base64 data URI, both of which produce\n    # a server-mediated upload bound to the current request.\n    if isinstance(doc, dict):\n        for url_field in (\"document_url\", \"image_url\"):\n            url_value = doc.get(url_field)\n            if isinstance(url_value, str) and url_value.startswith(\"reducto://\"):\n                raise ValueError(\n                    \"reducto:// file IDs are not accepted through the proxy \"\n                    \"OCR API; upload the file in the same request via \"\n                    \"multipart/form-data with a 'file' field, or pass an \"\n                    \"inline base64 data URI as the document URL.\"\n                )\n\n    return data\n\n\n@router.post(\n    \"/v1/ocr\",\n    dependencies=[Depends(user_api_key_auth)],\n    response_class=ORJSONResponse,\n    tags=[\"ocr\"],\n)\n@router.post(\n    \"/ocr\",\n    dependencies=[Depends(user_api_key_auth)],","sourceCodeStart":170,"sourceCodeEnd":206,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/ocr_endpoints/endpoints.py#L170-L206","documentation":"Error \"reducto:// file IDs are not accepted through the proxy OCR API; upload the file in the same request via multipart/form-data with a 'file' field, or pass an inline base64 data URI as the document URL.\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/proxy/ocr_endpoints/endpoints.py:188 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Upload the file via multipart/form-data with a 'file' field, or pass an inline base64 data URI as the document URL."],"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-14T00:17:10.932Z"}