Skip to content

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]

fix(openai-video): inherit BaseVideoConfig to enable async content response (#16708)

pnookala-godaddy52337961dcba
diff --git a/litellm/llms/openai/videos/transformation.py b/litellm/llms/openai/videos/transformation.py
index 8f5d41fe467..d1d3fc2919e 100644
--- a/litellm/llms/openai/videos/transformation.py
+++ b/litellm/llms/openai/videos/transformation.py
@@ -4,6 +4,7 @@ from typing import cast
import httpx
from httpx._types import RequestFiles
+from litellm.llms.base_llm.videos.transformation import BaseVideoConfig
from litellm.types.videos.main import VideoCreateOptionalRequestParams
from litellm.types.llms.openai import CreateVideoRequest
from litellm.types.router import GenericLiteLLMParams
@@ -15,15 +16,12 @@ from litellm.llms.openai.image_edit.transformation import ImageEditRequestUtils
if TYPE_CHECKING:
from litellm.litellm_core_utils.litellm_logging import Logging as _LiteLLMLoggingObj
- from ...base_llm.videos.transformation import BaseVideoConfig as _BaseVideoConfig
from ...base_llm.chat.transformation import BaseLLMException as _BaseLLMException
LiteLLMLoggingObj = _LiteLLMLoggingObj
- BaseVideoConfig = _BaseVideoConfig
BaseLLMException = _BaseLLMException
else:
LiteLLMLoggingObj = Any
- BaseVideoConfig = Any
BaseLLMException = Any
diff --git a/tests/test_litellm/test_video_generation.py b/tests/test_litellm/test_video_generation.py
index 3ba4a9ddda2..4c8e166f1c4 100644
--- a/tests/test_litellm/test_video_generation.py
+++ b/tests/test_litellm/test_video_generation.py
@@ -760,5 +760,10 @@ def test_video_content_handler_uses_get_for_openai():
assert called_url == "https://api.openai.com/v1/videos/video_abc/content"
+def test_openai_video_config_has_async_transform():
+ """Ensure OpenAIVideoConfig exposes async_transform_video_content_response at runtime."""
+ cfg = OpenAIVideoConfig()
+ assert callable(getattr(cfg, "async_transform_video_content_response", None))
+
if __name__ == "__main__":
pytest.main([__file__])