{"record":{"id":"fb9d3577437da732","repo":"BerriAI/litellm","slug":"no-response-data-in-completed-operation","errorCode":null,"errorMessage":"No response data in completed operation","messagePattern":"No response data in completed operation","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/gemini/videos/transformation.py","lineNumber":456,"sourceCode":"        2. Return download URL for the video\n        \"\"\"\n        operation_name: Final = extract_original_video_id(video_id)\n\n        status_url: Final = f\"{api_base.rstrip('/')}/v1beta/{operation_name}\"\n        client: Final = litellm.module_level_client\n        status_response: Final = client.get(url=status_url, headers=headers)\n        status_response.raise_for_status()\n        response_data: Final = status_response.json()\n\n        operation_response: Final = GeminiLongRunningOperationResponse(**response_data)\n\n        if not operation_response.done:\n            raise ValueError(\n                \"Video generation is not complete yet. Please check status with video_status() before downloading.\"\n            )\n\n        if not operation_response.response:\n            raise ValueError(\"No response data in completed operation\")\n\n        generated_samples: Final = operation_response.response.generateVideoResponse.generatedSamples\n        download_url: Final = generated_samples[0].video.uri\n\n        params: Final[dict[str, Any]] = {}\n\n        return download_url, params\n\n    def transform_video_content_response(\n        self,\n        raw_response: httpx.Response,\n        logging_obj: LiteLLMLoggingObj,\n    ) -> bytes:\n        \"\"\"\n        Transform the Veo video content download response.\n        Returns the video bytes directly.\n        \"\"\"\n        return raw_response.content","sourceCodeStart":438,"sourceCodeEnd":474,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/gemini/videos/transformation.py#L438-L474","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["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.","Rewrite the prompt to remove content that may trip safety filters and submit a new video_generation request.","If 'error' is empty and 'response' is still missing on a fresh generation, retry once — it can be a transient Google-side fault.","Report reproducible cases to litellm/Google with the operation name."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    content = litellm.video_content(video_id=video_id)\nexcept ValueError as e:\n    if \"No response data\" in str(e):\n        # completed operation produced nothing: regenerate with a safer prompt\n        logger.warning(\"veo operation %s finished without output\", video_id)\n        raise\n    raise","preventionTips":["Avoid prompts likely to trip video safety filters for production-critical assets.","Keep the original prompt + parameters so a failed operation can be regenerated cheaply.","Log the operation id whenever this fires; it is the key for support escalation."],"tags":["veo","gemini","video-download","safety-filter","empty-response"],"backgroundTag":"incomplete-api-response","analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}