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(gemini-video): inherit BaseVideoConfig to enable async content response (#16875)
Eiliyad88580fa2819
diff --git a/litellm/llms/gemini/videos/transformation.py b/litellm/llms/gemini/videos/transformation.pyindex d1ae47af269..ce2519e9177 100644--- a/litellm/llms/gemini/videos/transformation.py+++ b/litellm/llms/gemini/videos/transformation.py@@ -15,17 +15,16 @@ from litellm.images.utils import ImageEditRequestUtilsimport litellmfrom litellm.types.llms.gemini import GeminiLongRunningOperationResponse, GeminiVideoGenerationInstance, GeminiVideoGenerationParameters, GeminiVideoGenerationRequestfrom litellm.constants import DEFAULT_GOOGLE_VIDEO_DURATION_SECONDS+from litellm.llms.base_llm.videos.transformation import BaseVideoConfig+if TYPE_CHECKING:from litellm.litellm_core_utils.litellm_logging import Logging as _LiteLLMLoggingObj- from ...base_llm.videos.transformation import BaseVideoConfig as _BaseVideoConfigfrom ...base_llm.chat.transformation import BaseLLMException as _BaseLLMExceptionLiteLLMLoggingObj = _LiteLLMLoggingObj- BaseVideoConfig = _BaseVideoConfigBaseLLMException = _BaseLLMExceptionelse:LiteLLMLoggingObj = Any- BaseVideoConfig = AnyBaseLLMException = Anydiff --git a/tests/test_litellm/test_video_generation.py b/tests/test_litellm/test_video_generation.pyindex be7400d9b7f..1a66cd29c71 100644--- a/tests/test_litellm/test_video_generation.py+++ b/tests/test_litellm/test_video_generation.py@@ -14,6 +14,7 @@ import litellmfrom litellm.types.videos.main import VideoObject, VideoResponsefrom litellm.videos.main import video_generation, avideo_generation, video_status, avideo_statusfrom litellm.llms.openai.videos.transformation import OpenAIVideoConfig+from litellm.llms.gemini.videos.transformation import GeminiVideoConfigfrom litellm.llms.custom_httpx.llm_http_handler import BaseLLMHTTPHandlerfrom litellm.cost_calculator import default_video_cost_calculatorfrom litellm.litellm_core_utils.litellm_logging import Logging as LitellmLogging@@ -813,5 +814,12 @@ def test_openai_video_config_has_async_transform():cfg = OpenAIVideoConfig()assert callable(getattr(cfg, "async_transform_video_content_response", None))++def test_gemini_video_config_has_async_transform():+ """Ensure GeminiVideoConfig exposes async_transform_video_content_response at runtime."""+ cfg = GeminiVideoConfig()+ assert callable(getattr(cfg, "async_transform_video_content_response", None))++if __name__ == "__main__":pytest.main([__file__])