BerriAI/litellm · error · Exception

Operation timed out after {max_retries} attempts

Error message

Operation timed out after {max_retries} attempts

What it means

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.

Source

Thrown at litellm/rag/ingestion/vertex_ai_ingestion.py:278

            operation_data = response.json()

            if operation_data.get("done"):
                # Check for errors
                if "error" in operation_data:
                    error = operation_data["error"]
                    raise Exception(f"Operation failed: {error}")

                # Extract corpus name from response
                corpus_name = operation_data.get("response", {}).get("name", "")
                if corpus_name:
                    return corpus_name
                else:
                    raise Exception(f"No corpus name in operation response: {operation_data}")

            verbose_logger.debug("Operation not done yet, attempt %s/%s", attempt + 1, max_retries)
            await asyncio.sleep(retry_delay)

        raise Exception(f"Operation timed out after {max_retries} attempts")

    async def _upload_file_to_corpus(
        self,
        rag_corpus_id: str,
        filename: str,
        file_content: bytes,
        content_type: str | None,
    ) -> str:
        """
        Upload a file to Vertex AI RAG corpus using multipart upload.

        Args:
            rag_corpus_id: RAG corpus resource name
            filename: Name of the file
            file_content: File content bytes
            content_type: MIME type

        Returns:

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Increase max_retries/polling interval or check the long-running operation status in the Vertex console.
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at litellm/rag/ingestion/vertex_ai_ingestion.py:278 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18). Data as JSON: /api/errors/3250ce7750d5d4bc. Report an issue: GitHub.