{"record":{"id":"c9483c0ea09a9c8e","repo":"BerriAI/litellm","slug":"no-video-data-found-in-completed-operation","errorCode":null,"errorMessage":"No video data found in completed operation","messagePattern":"No video data found in completed operation","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/vertex_ai/videos/transformation.py","lineNumber":556,"sourceCode":"    ) -> bytes:\n        \"\"\"\n        Transform the Veo video content download response.\n\n        Extracts the base64 encoded video from the response and decodes it to bytes.\n        \"\"\"\n        response_data: Final = _parse_veo_operation(raw_response)\n\n        if not response_data.get(\"done\", False):\n            raise ValueError(\n                \"Video generation is not complete yet. Please check status with video_status() before downloading.\"\n            )\n\n        try:\n            video_response: Final = response_data.get(\"response\", {})\n            videos: Final = video_response.get(\"videos\", [])\n\n            if not videos or len(videos) == 0:\n                raise ValueError(\"No video data found in completed operation\")\n\n            # Get the first video\n            video_data: Final = videos[0]\n            base64_encoded: Final = video_data.get(\"bytesBase64Encoded\")\n\n            if not base64_encoded:\n                raise ValueError(\"No base64 encoded video data found\")\n\n            # Decode base64 to bytes\n            video_bytes: Final = base64.b64decode(base64_encoded)\n            return video_bytes\n\n        except (KeyError, IndexError) as e:\n            raise ValueError(f\"Failed to extract video data: {e}\")\n\n    def transform_video_remix_request(\n        self,\n        video_id: str,","sourceCodeStart":538,"sourceCodeEnd":574,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/vertex_ai/videos/transformation.py#L538-L574","documentation":"Raised during Veo content download when the operation reports done=true but `response.videos` is missing or an empty list. The completion path expects at least one video object carrying the base64 payload; an empty list means the operation finished without producing retrievable video data — typically because generation actually failed (negative-safety filters, internal error) but the operation was still marked done, or the response used a different schema (e.g. Reresponse/gcsUri-only variants).","triggerScenarios":"Prompt rejected by Veo safety filters causing the operation to complete with no artifacts; model versions returning only a gcsUri field under a different key; partially successful multi-segment generations where videos was pruned.","commonSituations":"Prompts with violence/copyright/celebrity content silently filtered; using newer Veo model versions whose response shape differs from what the parser expects; regional outages producing done-but-empty responses.","solutions":["Inspect the full operation response via video_status(video_id=...) — look for an error/filtered reason or a gcsUri-style result instead of inline bytes.","Soften/reword the prompt and retry; safety-filtered generations often complete with no videos array.","Try a different model version (e.g. veo-2.0-generate-001 vs veo-3) in a supported region.","Upgrade litellm if the response schema changed for your Veo model."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":"def veo_operation_has_video(status_payload: dict) -> bool:\n    resp = status_payload.get(\"response\") or {}\n    return bool(resp.get(\"videos\")) and len(resp[\"videos\"]) > 0","tryCatchPattern":"try:\n    content = litellm.retrieve_video_content(video_id=vid, vertex_project=proj)\nexcept ValueError as e:\n    if \"No video data found\" in str(e):\n        st = litellm.video_status(video_id=vid, vertex_project=proj)\n        # inspect st for error/filter/gcsUri and either fail with details or adjust prompt and resubmit\n        raise RuntimeError(f\"Veo completed without video payload: {st}\") from e\n    raise","preventionTips":["Inspect the full status payload before downloading; look for error or safety-filter fields.","Avoid prompts likely to trip safety filters for Veo generations.","Log status payloads for completed-but-empty operations and report them to your observability stack."],"tags":["vertex-ai","veo","video-generation","response-parsing","content-filter"],"backgroundTag":"malformed-provider-response","analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}