BerriAI/litellm · error · Exception

No corpus name in operation response: {operation_data}

Error message

No corpus name in operation response: {operation_data}

What it means

Raised when the Vertex AI operation finished successfully but its response contains no corpus 'name' field, so the caller cannot obtain the rag_corpus_id. Indicates an unexpected/unrecognized response shape from the Vertex AI API.

Source

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

            if response.status_code != 200:
                error_msg = f"Failed to poll operation: {response.text}"
                verbose_logger.error(error_msg)
                raise Exception(error_msg)

            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

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Inspect the operation response; the corpus may have failed to create — check Vertex logs and retry.
Defensive patterns

Strategy: try-catch

When it happens

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

Common situations: See trigger scenarios.


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