diff --git a/.github/workflows/test-unit.yml b/.github/workflows/test-unit.yml index 18df865c988..81559dfe7be 100644 --- a/.github/workflows/test-unit.yml +++ b/.github/workflows/test-unit.yml @@ -288,6 +288,7 @@ jobs: tests/unit/llms/linkup tests/unit/llms/litellm_proxy tests/unit/llms/llamafile + tests/unit/llms/llmman tests/unit/llms/lm_studio tests/unit/llms/manus tests/unit/llms/meta_llama diff --git a/litellm/__init__.py b/litellm/__init__.py index 1c161ba9ba1..1f05f1e0ba0 100644 --- a/litellm/__init__.py +++ b/litellm/__init__.py @@ -2055,6 +2055,7 @@ if TYPE_CHECKING: LiteLLMProxyChatConfig: Type[_LiteLLMProxyChatConfig] DeepInfraConfig: Type[_DeepInfraConfig] LlamafileChatConfig: Type[_LlamafileChatConfig] + LlmmanChatConfig: Type[_LlmmanChatConfig] LMStudioChatConfig: Type[_LMStudioChatConfig] LmStudioEmbeddingConfig: Type[_LmStudioEmbeddingConfig] IBMWatsonXEmbeddingConfig: Type[_IBMWatsonXEmbeddingConfig] diff --git a/litellm/litellm_core_utils/get_llm_provider_logic.py b/litellm/litellm_core_utils/get_llm_provider_logic.py index 36db422bf84..e2a242f6068 100644 --- a/litellm/litellm_core_utils/get_llm_provider_logic.py +++ b/litellm/litellm_core_utils/get_llm_provider_logic.py @@ -705,17 +705,15 @@ def _get_openai_compatible_provider_info( api_base, dynamic_api_key, ) = litellm.HostedVLLMChatConfig().get_openai_compatible_provider_info(api_base, api_key) - elif custom_llm_provider == "llamafile": - # llamafile is OpenAI compatible. + elif custom_llm_provider in ("llamafile", "llmman"): + # llamafile and llmman are OpenAI compatible. + local_config: Final = ( + litellm.LlamafileChatConfig if custom_llm_provider == "llamafile" else litellm.LlmmanChatConfig + ) ( api_base, dynamic_api_key, - ) = litellm.LlamafileChatConfig().get_openai_compatible_provider_info(api_base, api_key) - elif custom_llm_provider == "llmman": - ( - api_base, - dynamic_api_key, - ) = litellm.LlmmanChatConfig().get_openai_compatible_provider_info(api_base, api_key) + ) = local_config().get_openai_compatible_provider_info(api_base, api_key) elif custom_llm_provider == "datarobot": # DataRobot is OpenAI compatible. (