{"record":{"id":"620c52a55ce6ee4b","repo":"BerriAI/litellm","slug":"video-url-not-found-in-response-video-may-not-be","errorCode":null,"errorMessage":"Video URL not found in response. Video may not be ready yet.","messagePattern":"Video URL not found in response\\. Video may not be ready yet\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/runwayml/videos/transformation.py","lineNumber":378,"sourceCode":"        Helper method to extract video URL from RunwayML response.\n        Shared between sync and async transforms.\n        \"\"\"\n        # Extract video URL from the output field\n        video_url = None\n        if \"output\" in response_data and response_data[\"output\"]:\n            output: Final = response_data[\"output\"]\n            video_url = output[0] if isinstance(output, list) else output\n\n        if not video_url:\n            # Check if the video generation failed or is still processing\n            status: Final = response_data.get(\"status\", \"UNKNOWN\")\n            if status in [\"PENDING\", \"RUNNING\", \"THROTTLED\"]:\n                raise ValueError(f\"Video is still processing (status: {status}). Please wait and try again.\")\n            elif status == \"FAILED\":\n                failure_reason: Final = response_data.get(\"failure\", \"Unknown error\")\n                raise ValueError(f\"Video generation failed: {failure_reason}\")\n            else:\n                raise ValueError(\"Video URL not found in response. Video may not be ready yet.\")\n\n        return video_url\n\n    def transform_video_content_response(\n        self,\n        raw_response: httpx.Response,\n        logging_obj: LiteLLMLoggingObj,\n    ) -> bytes:\n        \"\"\"\n        Transform the RunwayML video content download response (synchronous).\n\n        RunwayML's task endpoint returns JSON with a video URL in the output field.\n        We need to extract the URL and download the video.\n\n        Example response:\n        {\n            \"id\":\"63fd0f13-f29d-4e58-99d3-1cb9efa14a5b\",\n            \"createdAt\":\"2025-11-11T21:48:50.448Z\",","sourceCodeStart":360,"sourceCodeEnd":396,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/runwayml/videos/transformation.py#L360-L396","documentation":"Fallback guard while extracting a video URL: output was empty and the status is neither a known processing state nor FAILED, so the code cannot tell whether the video will appear; raised to avoid silently returning nothing.","triggerScenarios":"Triggered when the RunwayML video response contains no video URL, typically because the video is not ready.","commonSituations":"See trigger scenarios.","solutions":["The video may not be ready; poll the task again later.","If the task is complete, inspect the response payload for the output URL field."],"exampleFix":"# retry retrieval after the task reaches SUCCEEDED status.","handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}