The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix(runwayml): skip progress scaling when Runway returns a null progress
mateo-berri3030e974b889
diff --git a/litellm/llms/runwayml/videos/transformation.py b/litellm/llms/runwayml/videos/transformation.pyindex 065661a8731..2264f52e2a3 100644--- a/litellm/llms/runwayml/videos/transformation.py+++ b/litellm/llms/runwayml/videos/transformation.py@@ -636,8 +636,9 @@ class RunwayMLVideoConfig(BaseVideoConfig):if "completedAt" in response_data:video_data["completed_at"] = self._parse_runway_timestamp(response_data.get("completedAt"))- if "progress" in response_data:- video_data["progress"] = _progress_percent(response_data["progress"])+ progress_value: Final = response_data.get("progress")+ if progress_value is not None:+ video_data["progress"] = _progress_percent(progress_value)if "failureCode" in response_data or "failure" in response_data:video_data["error"] = {diff --git a/tests/test_litellm/llms/runwayml/videos/test_runway_video_transformation.py b/tests/test_litellm/llms/runwayml/videos/test_runway_video_transformation.pyindex e52cf9211ec..afc8e7ec4a2 100644--- a/tests/test_litellm/llms/runwayml/videos/test_runway_video_transformation.py+++ b/tests/test_litellm/llms/runwayml/videos/test_runway_video_transformation.py@@ -119,6 +119,25 @@ class TestRunwayMLVideoTransformation:assert result.status == "in_progress"assert result.progress == 3+ def test_status_progress_null_leaves_progress_unset(self):+ """Runway sends an explicit null progress for pending polls; scaling it must not crash."""+ mock_response = Mock(spec=httpx.Response)+ mock_response.json.return_value = {+ "id": "63fd0f13-f29d-4e58-99d3-1cb9efa14a5b",+ "createdAt": "2025-11-11T21:48:50.448Z",+ "status": "PENDING",+ "progress": None,+ }++ result = self.config.transform_video_status_retrieve_response(+ raw_response=mock_response,+ logging_obj=self.mock_logging_obj,+ custom_llm_provider="runwayml",+ )++ assert result.status == "queued"+ assert result.progress is None+def test_get_error_class_returns_exception_instead_of_raising(self):error = self.config.get_error_class(error_message="Invalid API key",