refactor(hosted_vllm): register videos adapter via llms getter

Keep Hosted VLLM video construction under litellm/llms and have ProviderConfigManager call the getter instead of importing the config class
This commit is contained in:
mubashir1osmani 2026-08-24 17:16:40 -04:00
parent 8f812f5636
commit 01006b713a
3 changed files with 13 additions and 2 deletions

View file

@ -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()

View file

@ -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

View file

@ -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():