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]

refactor(hosted_vllm): register videos adapter via llms getter

mubashir1osmani01006b713a27
diff --git a/litellm/llms/hosted_vllm/videos/__init__.py b/litellm/llms/hosted_vllm/videos/__init__.py
new file mode 100644
index 00000000000..89aa5ef2e8b
--- /dev/null
+++ b/litellm/llms/hosted_vllm/videos/__init__.py
@@ -0,0 +1,9 @@
+from litellm.llms.base_llm.videos.transformation import BaseVideoConfig
+
+from .transformation import HostedVLLMVideoConfig
+
+__all__ = ("HostedVLLMVideoConfig",)
+
+
+def get_hosted_vllm_video_config(model: str | None) -> BaseVideoConfig:
+ return HostedVLLMVideoConfig()
diff --git a/litellm/utils.py b/litellm/utils.py
index 9e91c742131..b026d33271f 100644
--- a/litellm/utils.py
+++ b/litellm/utils.py
@@ -8930,9 +8930,9 @@ class ProviderConfigManager:
return RunwayMLVideoConfig()
elif LlmProviders.HOSTED_VLLM == provider:
- from litellm.llms.hosted_vllm.videos.transformation import HostedVLLMVideoConfig
+ from litellm.llms.hosted_vllm.videos import get_hosted_vllm_video_config
- return HostedVLLMVideoConfig()
+ return get_hosted_vllm_video_config(model)
return None
@staticmethod
diff --git a/tests/test_litellm/llms/hosted_vllm/videos/test_hosted_vllm_video_transformation.py b/tests/test_litellm/llms/hosted_vllm/videos/test_hosted_vllm_video_transformation.py
index d0bbb0ccd7a..de266db6700 100644
--- a/tests/test_litellm/llms/hosted_vllm/videos/test_hosted_vllm_video_transformation.py
+++ b/tests/test_litellm/llms/hosted_vllm/videos/test_hosted_vllm_video_transformation.py
@@ -7,6 +7,7 @@ from unittest.mock import MagicMock, patch
import pytest
import litellm
+from litellm.llms.hosted_vllm.videos import get_hosted_vllm_video_config
from litellm.llms.hosted_vllm.videos.transformation import (
HostedVLLMVideoConfig,
_serialize_form_value,
@@ -29,6 +30,7 @@ def test_provider_config_registration():
assert config is not None
assert isinstance(config, HostedVLLMVideoConfig)
+ assert isinstance(get_hosted_vllm_video_config("MiniMax-H3"), HostedVLLMVideoConfig)
def test_get_complete_url_appends_videos():