mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-10 22:41:41 +00:00
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:
parent
8f812f5636
commit
01006b713a
3 changed files with 13 additions and 2 deletions
9
litellm/llms/hosted_vllm/videos/__init__.py
Normal file
9
litellm/llms/hosted_vllm/videos/__init__.py
Normal 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()
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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():
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue