BerriAI/litellm · error · Exception

Failed to import files: {response.text}

Error message

Failed to import files: {response.text}

What it means

Vertex AI RAG guard: the documents.import call to the corpus returned a non-2xx status (bad corpus name, auth, or malformed request); the API's response text is included in the message.

Source

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

        client: Final = get_async_httpx_client(
            llm_provider=httpxSpecialProvider.RAG,
            params={"timeout": 60.0},
        )

        response: Final = await client.post(
            url,
            json=request_body,
            headers={
                "Authorization": f"Bearer {access_token}",
                "Content-Type": "application/json",
            },
        )

        if response.status_code not in [200, 201]:
            error_msg: Final = f"Failed to import files: {response.text}"
            verbose_logger.error(error_msg)
            raise Exception(error_msg)

        response_data: Final = response.json()
        operation_name: Final = response_data.get("name", "")

        verbose_logger.debug("Import operation started: %s", operation_name)
        return operation_name

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Check the response text; verify the files exist in the corpus and import parameters are valid.
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at litellm/rag/ingestion/vertex_ai_ingestion.py:456 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/02e393d34746b934. Report an issue: GitHub.