{"record":{"id":"3250ce7750d5d4bc","repo":"BerriAI/litellm","slug":"operation-timed-out-after-max-retries-attempts","errorCode":null,"errorMessage":"Operation timed out after {max_retries} attempts","messagePattern":"Operation timed out after (.+?) attempts","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"litellm/rag/ingestion/vertex_ai_ingestion.py","lineNumber":278,"sourceCode":"            operation_data = response.json()\n\n            if operation_data.get(\"done\"):\n                # Check for errors\n                if \"error\" in operation_data:\n                    error = operation_data[\"error\"]\n                    raise Exception(f\"Operation failed: {error}\")\n\n                # Extract corpus name from response\n                corpus_name = operation_data.get(\"response\", {}).get(\"name\", \"\")\n                if corpus_name:\n                    return corpus_name\n                else:\n                    raise Exception(f\"No corpus name in operation response: {operation_data}\")\n\n            verbose_logger.debug(\"Operation not done yet, attempt %s/%s\", attempt + 1, max_retries)\n            await asyncio.sleep(retry_delay)\n\n        raise Exception(f\"Operation timed out after {max_retries} attempts\")\n\n    async def _upload_file_to_corpus(\n        self,\n        rag_corpus_id: str,\n        filename: str,\n        file_content: bytes,\n        content_type: str | None,\n    ) -> str:\n        \"\"\"\n        Upload a file to Vertex AI RAG corpus using multipart upload.\n\n        Args:\n            rag_corpus_id: RAG corpus resource name\n            filename: Name of the file\n            file_content: File content bytes\n            content_type: MIME type\n\n        Returns:","sourceCodeStart":260,"sourceCodeEnd":296,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/rag/ingestion/vertex_ai_ingestion.py#L260-L296","documentation":"Vertex AI RAG ingestion polling loop exhausted max_retries polls without the operation reaching 'done'. The long-running ingestion operation is stuck or too slow; retry or raise the retry budget.","triggerScenarios":"Thrown at litellm/rag/ingestion/vertex_ai_ingestion.py:278 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Increase max_retries/polling interval or check the long-running operation status in the Vertex console."],"exampleFix":null,"handlingStrategy":"retry","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"}