BerriAI/litellm · error · ValueError

No response data in completed operation

Error message

No response data in completed operation

What it means

During litellm.video_content() the operation was fetched, done is true, but the 'response' block (which carries generateVideoResponse.generatedSamples[0].video.uri) is absent. A completed Veo operation with no response payload means the run finished without producing a downloadable sample — usually a server-side failure or a safety-blocked generation.

Solutions

  1. GET the operation directly ({api_base}/v1beta/{operation_name} with your auth header) and inspect its 'error' field — it usually explains why no video was produced.
  2. Rewrite the prompt to remove content that may trip safety filters and submit a new video_generation request.
  3. If 'error' is empty and 'response' is still missing on a fresh generation, retry once — it can be a transient Google-side fault.
  4. Report reproducible cases to litellm/Google with the operation name.
Defensive patterns

Strategy: try-catch

Try / catch

try:
    content = litellm.video_content(video_id=video_id)
except ValueError as e:
    if "No response data" in str(e):
        # completed operation produced nothing: regenerate with a safer prompt
        logger.warning("veo operation %s finished without output", video_id)
        raise
    raise

Prevention

When it happens

Trigger: Calling litellm.video_content() on a video_id whose operation reports done=true but contains no 'response' key; prompts that trip Google's safety filters; transient Google-side failures that mark the operation done without output.

Common situations: Prompts with people, violence, or trademarked content that Veo silently filters; retrying a download long after the operation response expired; inspecting operations created by a different (older) API version.

Related errors


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

Appendix: source

Thrown at litellm/llms/gemini/videos/transformation.py:456

        2. Return download URL for the video
        """
        operation_name: Final = extract_original_video_id(video_id)

        status_url: Final = f"{api_base.rstrip('/')}/v1beta/{operation_name}"
        client: Final = litellm.module_level_client
        status_response: Final = client.get(url=status_url, headers=headers)
        status_response.raise_for_status()
        response_data: Final = status_response.json()

        operation_response: Final = GeminiLongRunningOperationResponse(**response_data)

        if not operation_response.done:
            raise ValueError(
                "Video generation is not complete yet. Please check status with video_status() before downloading."
            )

        if not operation_response.response:
            raise ValueError("No response data in completed operation")

        generated_samples: Final = operation_response.response.generateVideoResponse.generatedSamples
        download_url: Final = generated_samples[0].video.uri

        params: Final[dict[str, Any]] = {}

        return download_url, params

    def transform_video_content_response(
        self,
        raw_response: httpx.Response,
        logging_obj: LiteLLMLoggingObj,
    ) -> bytes:
        """
        Transform the Veo video content download response.
        Returns the video bytes directly.
        """
        return raw_response.content

View on GitHub (pinned to 77b7c6c40c)