{"record":{"id":"e4f6aa43ed3e9eed","repo":"BerriAI/litellm","slug":"no-text-content-could-be-extracted-from-the-file-f","errorCode":null,"errorMessage":"No text content could be extracted from the file for embedding. Possible causes:\n  1. PDF files require OCR - add 'ocr' config with a vision model (e.g., 'anthropic/claude-3-5-sonnet-20241022')\n  2. Binary files cannot be processed - convert to text first\n  3. File is empty or contains no extractable text\nFor PDFs, either enable OCR or use a PDF extraction library to convert to text before ingestion.","messagePattern":"No text content could be extracted from the file for embedding\\. Possible causes:\n  1\\. PDF files require OCR - add 'ocr' config with a vision model \\(e\\.g\\., 'anthropic/claude-3-5-sonnet-20241022'\\)\n  2\\. Binary files cannot be processed - convert to text first\n  3\\. File is empty or contains no extractable text\nFor PDFs, either enable OCR or use a PDF extraction library to convert to text before ingestion\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/rag/ingestion/s3_vectors_ingestion.py","lineNumber":468,"sourceCode":"            existing_file_id: Existing provider file ID, unsupported for S3 Vectors\n\n        Returns:\n            Tuple of (index_name, filename)\n        \"\"\"\n        # Ensure infrastructure exists\n        await self._ensure_config_initialized()\n\n        if not embeddings or not chunks:\n            error_msg: Final = (\n                \"No text content could be extracted from the file for embedding. \"\n                \"Possible causes:\\n\"\n                \"  1. PDF files require OCR - add 'ocr' config with a vision model (e.g., 'anthropic/claude-3-5-sonnet-20241022')\\n\"\n                \"  2. Binary files cannot be processed - convert to text first\\n\"\n                \"  3. File is empty or contains no extractable text\\n\"\n                \"For PDFs, either enable OCR or use a PDF extraction library to convert to text before ingestion.\"\n            )\n            verbose_logger.error(error_msg)\n            raise ValueError(error_msg)\n\n        # Prepare vectors for PutVectors API\n        vectors: Final = [\n            S3VectorEntry(\n                key=f\"{filename}_{i}\" if filename else f\"chunk_{i}\",\n                data=S3VectorDataPayload(float32=embedding),\n                metadata=(\n                    {\"source_text\": chunk, \"chunk_index\": str(i), \"filename\": filename}\n                    if filename\n                    else {\"source_text\": chunk, \"chunk_index\": str(i)}\n                ),\n            )\n            for i, (chunk, embedding) in enumerate(zip(chunks, embeddings))\n        ]\n\n        # Call PutVectors API\n        await self._put_vectors(vectors)\n","sourceCodeStart":450,"sourceCodeEnd":486,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/rag/ingestion/s3_vectors_ingestion.py#L450-L486","documentation":"Error \"No text content could be extracted from the file for embedding. Possible causes:\n  1. PDF files require OCR - add 'ocr' config with a vision model (e.g., 'anthropic/claude-3-5-sonnet-20241022')\n  2. Binary files cannot be processed - convert to text first\n  3. File is empty or contains no extractable text\nFor PDFs, either enable OCR or use a PDF extraction library to convert to text before ingestion.\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/rag/ingestion/s3_vectors_ingestion.py:468 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["For PDFs, add an 'ocr' config with a vision model, or convert the file to text before ingestion.","Verify the file is non-empty and contains extractable text."],"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"}