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) unable to pass input_type parameter to Voyage AI embedding mode (#7276)
Ishaan Jaff7a5dd29fe05e
diff --git a/litellm/__init__.py b/litellm/__init__.pyindex 70e2412a953..c1b0d86d12d 100644--- a/litellm/__init__.py+++ b/litellm/__init__.py@@ -1083,6 +1083,7 @@ from .llms.openai.openai import OpenAIConfig, MistralEmbeddingConfigfrom .llms.deepinfra.chat.transformation import DeepInfraConfigfrom litellm.llms.openai.completion.transformation import OpenAITextCompletionConfigfrom .llms.groq.chat.transformation import GroqChatConfig+from .llms.voyage.embedding.transformation import VoyageEmbeddingConfigfrom .llms.azure_ai.chat.transformation import AzureAIStudioConfigfrom .llms.mistral.mistral_chat_transformation import MistralConfigfrom .llms.openai.chat.o1_transformation import (diff --git a/litellm/litellm_core_utils/get_llm_provider_logic.py b/litellm/litellm_core_utils/get_llm_provider_logic.pyindex 57ab1ec7ef4..8039dfb2895 100644--- a/litellm/litellm_core_utils/get_llm_provider_logic.py+++ b/litellm/litellm_core_utils/get_llm_provider_logic.py@@ -536,14 +536,6 @@ def _get_openai_compatible_provider_info( # noqa: PLR0915) = litellm.XAIChatConfig()._get_openai_compatible_provider_info(api_base, api_key)- elif custom_llm_provider == "voyage":- # voyage is openai compatible, we just need to set this to custom_openai and have the api_base be https://api.voyageai.com/v1- api_base = (- api_base- or get_secret_str("VOYAGE_API_BASE")- or "https://api.voyageai.com/v1"- ) # type: ignore- dynamic_api_key = api_key or get_secret_str("VOYAGE_API_KEY")elif custom_llm_provider == "together_ai":api_base = (api_basediff --git a/litellm/litellm_core_utils/get_supported_openai_params.py b/litellm/litellm_core_utils/get_supported_openai_params.pyindex 4e12d5ef828..38fca0b1c3e 100644--- a/litellm/litellm_core_utils/get_supported_openai_params.py+++ b/litellm/litellm_core_utils/get_supported_openai_params.py@@ -34,6 +34,8 @@ def get_supported_openai_params( # noqa: PLR0915return litellm.OllamaChatConfig().get_supported_openai_params(model=model)elif custom_llm_provider == "anthropic":return litellm.AnthropicConfig().get_supported_openai_params(model=model)+ elif custom_llm_provider == "anthropic_text":+ return litellm.AnthropicTextConfig().get_supported_openai_params(model=model)elif custom_llm_provider == "fireworks_ai":if request_type == "embeddings":return litellm.FireworksAIEmbeddingConfig().get_supported_openai_params(@@ -168,10 +170,17 @@ def get_supported_openai_params( # noqa: PLR0915]elif custom_llm_provider == "watsonx":return litellm.IBMWatsonXChatConfig().get_supported_openai_params(model=model)- elif custom_llm_provider == "custom_openai" or "text-completion-openai":+ elif custom_llm_provider == "watsonx_text":+ return litellm.IBMWatsonXAIConfig().get_supported_openai_params(model=model)+ elif (+ custom_llm_provider == "custom_openai"+ or custom_llm_provider == "text-completion-openai"+ ):return litellm.OpenAITextCompletionConfig().get_supported_openai_params(model=model)elif custom_llm_provider == "predibase":return litellm.PredibaseConfig().get_supported_openai_params(model=model)+ elif custom_llm_provider == "voyage":+ return litellm.VoyageEmbeddingConfig().get_supported_openai_params(model=model)return Nonediff --git a/litellm/llms/anthropic/chat/transformation.py b/litellm/llms/anthropic/chat/transformation.pyindex 39582d1314f..b3328e048e8 100644--- a/litellm/llms/anthropic/chat/transformation.py+++ b/litellm/llms/anthropic/chat/transformation.py@@ -21,7 +21,7 @@ import litellmfrom litellm.constants import RESPONSE_FORMAT_TOOL_NAMEfrom litellm.litellm_core_utils.core_helpers import map_finish_reasonfrom litellm.litellm_core_utils.prompt_templates.factory import anthropic_messages_pt-from litellm.llms.base_llm.transformation import BaseConfig, BaseLLMException+from litellm.llms.base_llm.chat.transformation import BaseConfig, BaseLLMExceptionfrom litellm.types.llms.anthropic import (AllAnthropicToolsValues,AnthropicComputerTool,diff --git a/litellm/llms/anthropic/common_utils.py b/litellm/llms/anthropic/common_utils.pyindex 8ef79f95058..409bbe2d829 100644--- a/litellm/llms/anthropic/common_utils.py+++ b/litellm/llms/anthropic/common_utils.py@@ -6,7 +6,7 @@ from typing import Optional, Unionimport httpx-from litellm.llms.base_llm.transformation import BaseLLMException+from litellm.llms.base_llm.chat.transformation import BaseLLMExceptionclass AnthropicError(BaseLLMException):diff --git a/litellm/llms/anthropic/completion/transformation.py b/litellm/llms/anthropic/completion/transformation.pyindex 2435d7d4adc..df8064ddf48 100644--- a/litellm/llms/anthropic/completion/transformation.py+++ b/litellm/llms/anthropic/completion/transformation.py@@ -11,13 +11,16 @@ from typing import Any, AsyncIterator, Dict, Iterator, List, Optional, Unionimport httpximport litellm+from litellm.litellm_core_utils.prompt_templates.factory import (+ custom_prompt,+ prompt_factory,+)from litellm.llms.base_llm.base_model_iterator import BaseModelResponseIterator-from litellm.llms.base_llm.transformation import (+from litellm.llms.base_llm.chat.transformation import (BaseConfig,BaseLLMException,LiteLLMLoggingObj,)-from litellm.litellm_core_utils.prompt_templates.factory import custom_prompt, prompt_factoryfrom litellm.types.llms.openai import AllMessageValuesfrom litellm.types.utils import (ChatCompletionToolCallChunk,diff --git a/litellm/llms/azure/chat/gpt_transformation.py b/litellm/llms/azure/chat/gpt_transformation.pyindex 5af1a675aaa..d770803eb69 100644--- a/litellm/llms/azure/chat/gpt_transformation.py+++ b/litellm/llms/azure/chat/gpt_transformation.py@@ -7,7 +7,7 @@ import litellmfrom litellm.litellm_core_utils.prompt_templates.factory import (convert_to_azure_openai_messages,)-from litellm.llms.base_llm.transformation import BaseLLMException+from litellm.llms.base_llm.chat.transformation import BaseLLMExceptionfrom litellm.types.utils import ModelResponsefrom ....exceptions import UnsupportedParamsError@@ -18,7 +18,7 @@ from ....types.llms.openai import (ChatCompletionToolParam,ChatCompletionToolParamFunctionChunk,)-from ...base_llm.transformation import BaseConfig+from ...base_llm.chat.transformation import BaseConfigfrom ..common_utils import AzureOpenAIErrorif TYPE_CHECKING:diff --git a/litellm/llms/azure/common_utils.py b/litellm/llms/azure/common_utils.pyindex f54a5499c0b..dfcb3d82b97 100644--- a/litellm/llms/azure/common_utils.py+++ b/litellm/llms/azure/common_utils.py@@ -3,7 +3,7 @@ from typing import Callable, Optional, Unionimport httpxfrom litellm._logging import verbose_logger-from litellm.llms.base_llm.transformation import BaseLLMException+from litellm.llms.base_llm.chat.transformation import BaseLLMExceptionfrom litellm.secret_managers.main import get_secret_strdiff --git a/litellm/llms/base_llm/transformation.py b/litellm/llms/base_llm/chat/transformation.pysimilarity index 100%rename from litellm/llms/base_llm/transformation.pyrename to litellm/llms/base_llm/chat/transformation.pydiff --git a/litellm/llms/base_llm/embedding/transformation.py b/litellm/llms/base_llm/embedding/transformation.pynew file mode 100644index 00000000000..7b2873b6d71--- /dev/null+++ b/litellm/llms/base_llm/embedding/transformation.py@@ -0,0 +1,94 @@+import types+from abc import ABC, abstractmethod+from typing import (+ TYPE_CHECKING,+ Any,+ AsyncIterator,+ Callable,+ Dict,+ Iterator,+ List,+ Optional,+ TypedDict,+ Union,+)++import httpx++from litellm.llms.base_llm.chat.transformation import BaseConfig+from litellm.types.llms.openai import AllMessageValues+from litellm.types.utils import EmbeddingResponse, ModelResponse++if TYPE_CHECKING:+ from litellm.litellm_core_utils.litellm_logging import Logging as _LiteLLMLoggingObj++ LiteLLMLoggingObj = _LiteLLMLoggingObj+else:+ LiteLLMLoggingObj = Any+++class BaseEmbeddingConfig(BaseConfig, ABC):++ @abstractmethod+ def transform_embedding_request(+ self,+ model: str,+ input: Union[str, List[str], List[float], List[List[float]]],+ optional_params: dict,+ headers: dict,+ ) -> dict:+ return {}++ @abstractmethod+ def transform_embedding_response(+ self,+ model: str,+ raw_response: httpx.Response,+ model_response: EmbeddingResponse,+ logging_obj: LiteLLMLoggingObj,+ api_key: Optional[str] = None,+ request_data: dict = {},+ optional_params: dict = {},+ litellm_params: dict = {},+ ) -> EmbeddingResponse:+ return model_response++ def get_complete_url(self, api_base: Optional[str], model: str) -> str:+ """+ OPTIONAL++ Get the complete url for the request++ Some providers need `model` in `api_base`+ """+ return api_base or ""++ def transform_request(+ self,+ model: str,+ messages: List[AllMessageValues],+ optional_params: dict,+ litellm_params: dict,+ headers: dict,+ ) -> dict:+ raise NotImplementedError(+ "EmbeddingConfig does not need a request transformation for chat models"+ )++ def transform_response(+ self,+ model: str,+ raw_response: httpx.Response,+ model_response: ModelResponse,+ logging_obj: LiteLLMLoggingObj,+ request_data: dict,+ messages: List[AllMessageValues],+ optional_params: dict,+ litellm_params: dict,+ encoding: Any,+ api_key: Optional[str] = None,+ json_mode: Optional[bool] = None,+ ) -> ModelResponse:+ raise NotImplementedError(+ "EmbeddingConfig does not need a response transformation for chat models"+ )diff --git a/litellm/llms/clarifai/chat/transformation.py b/litellm/llms/clarifai/chat/transformation.pyindex fac16f7ca60..5dc22c284ef 100644--- a/litellm/llms/clarifai/chat/transformation.py+++ b/litellm/llms/clarifai/chat/transformation.py@@ -9,7 +9,7 @@ from litellm.litellm_core_utils.prompt_templates.common_utils import (convert_content_list_to_str,)from litellm.llms.base_llm.base_model_iterator import FakeStreamResponseIterator-from litellm.llms.base_llm.transformation import BaseConfig, BaseLLMException+from litellm.llms.base_llm.chat.transformation import BaseConfig, BaseLLMExceptionfrom litellm.types.llms.openai import AllMessageValuesfrom litellm.types.utils import (ChatCompletionToolCallChunk,diff --git a/litellm/llms/clarifai/common_utils.py b/litellm/llms/clarifai/common_utils.pyindex 0f249a07204..9190e8554a4 100644--- a/litellm/llms/clarifai/common_utils.py+++ b/litellm/llms/clarifai/common_utils.py@@ -1,6 +1,6 @@import httpx-from litellm.llms.base_llm.transformation import BaseLLMException+from litellm.llms.base_llm.chat.transformation import BaseLLMExceptionclass ClarifaiError(BaseLLMException):diff --git a/litellm/llms/cloudflare/chat/transformation.py b/litellm/llms/cloudflare/chat/transformation.pyindex 4906f7b44e1..596875919a3 100644--- a/litellm/llms/cloudflare/chat/transformation.py+++ b/litellm/llms/cloudflare/chat/transformation.py@@ -6,7 +6,7 @@ import httpximport litellmfrom litellm.llms.base_llm.base_model_iterator import BaseModelResponseIterator-from litellm.llms.base_llm.transformation import (+from litellm.llms.base_llm.chat.transformation import (BaseConfig,BaseLLMException,LiteLLMLoggingObj,diff --git a/litellm/llms/cohere/chat/transformation.py b/litellm/llms/cohere/chat/transformation.pyindex 8002bf914f7..39df1e021f4 100644--- a/litellm/llms/cohere/chat/transformation.py+++ b/litellm/llms/cohere/chat/transformation.py@@ -5,8 +5,8 @@ from typing import TYPE_CHECKING, Any, AsyncIterator, Iterator, List, Optional,import httpximport litellm-from litellm.llms.base_llm.transformation import BaseConfig, BaseLLMExceptionfrom litellm.litellm_core_utils.prompt_templates.factory import cohere_messages_pt_v2+from litellm.llms.base_llm.chat.transformation import BaseConfig, BaseLLMExceptionfrom litellm.types.llms.openai import AllMessageValuesfrom litellm.types.utils import ModelResponse, Usagediff --git a/litellm/llms/cohere/common_utils.py b/litellm/llms/cohere/common_utils.pyindex 6aaad2b7068..11ff73efc29 100644--- a/litellm/llms/cohere/common_utils.py+++ b/litellm/llms/cohere/common_utils.py@@ -1,7 +1,7 @@import jsonfrom typing import List, Optional-from litellm.llms.base_llm.transformation import BaseLLMException+from litellm.llms.base_llm.chat.transformation import BaseLLMExceptionfrom litellm.types.llms.openai import AllMessageValuesfrom litellm.types.utils import (ChatCompletionToolCallChunk,diff --git a/litellm/llms/cohere/completion/transformation.py b/litellm/llms/cohere/completion/transformation.pyindex 2240d4ea711..61d5ca5ad39 100644--- a/litellm/llms/cohere/completion/transformation.py+++ b/litellm/llms/cohere/completion/transformation.py@@ -6,8 +6,10 @@ from typing import TYPE_CHECKING, Any, AsyncIterator, Iterator, List, Optional,import httpximport litellm-from litellm.llms.base_llm.transformation import BaseConfig, BaseLLMException-from litellm.litellm_core_utils.prompt_templates.common_utils import convert_content_list_to_str+from litellm.litellm_core_utils.prompt_templates.common_utils import (+ convert_content_list_to_str,+)+from litellm.llms.base_llm.chat.transformation import BaseConfig, BaseLLMExceptionfrom litellm.types.llms.openai import AllMessageValuesfrom litellm.types.utils import (ChatCompletionToolCallChunk,diff --git a/litellm/llms/custom_httpx/llm_http_handler.py b/litellm/llms/custom_httpx/llm_http_handler.pyindex 51e1dae6b06..01043a6d9b2 100644--- a/litellm/llms/custom_httpx/llm_http_handler.py+++ b/litellm/llms/custom_httpx/llm_http_handler.py@@ -21,13 +21,15 @@ import litellm.typesimport litellm.types.utilsfrom litellm import verbose_loggerfrom litellm.litellm_core_utils.core_helpers import map_finish_reason-from litellm.llms.base_llm.transformation import BaseConfig, BaseLLMException+from litellm.llms.base_llm.chat.transformation import BaseConfig, BaseLLMException+from litellm.llms.base_llm.embedding.transformation import BaseEmbeddingConfigfrom litellm.llms.custom_httpx.http_handler import (AsyncHTTPHandler,HTTPHandler,_get_httpx_client,get_async_httpx_client,)+from litellm.types.utils import EmbeddingResponsefrom litellm.utils import CustomStreamWrapper, ModelResponse, ProviderConfigManagerif TYPE_CHECKING:@@ -403,6 +405,139 @@ class BaseLLMHTTPHandler:return completion_stream, response.headers+ def embedding(+ self,+ model: str,+ input: list,+ timeout: float,+ custom_llm_provider: str,+ logging_obj: LiteLLMLoggingObj,+ api_base: Optional[str],+ optional_params: dict,+ model_response: EmbeddingResponse,+ api_key: Optional[str] = None,+ client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,+ aembedding: bool = False,+ headers={},+ ) -> EmbeddingResponse:++ provider_config = ProviderConfigManager.get_provider_embedding_config(+ model=model, provider=litellm.LlmProviders(custom_llm_provider)+ )+ # get config from model, custom llm provider+ headers = provider_config.validate_environment(+ api_key=api_key,+ headers=headers,+ model=model,+ messages=[],+ optional_params=optional_params,+ )++ api_base = provider_config.get_complete_url(+ api_base=api_base,+ model=model,+ )++ data = provider_config.transform_embedding_request(+ model=model,+ input=input,+ optional_params=optional_params,+ headers=headers,+ )++ ## LOGGING+ logging_obj.pre_call(+ input=input,+ api_key=api_key,+ additional_args={+ "complete_input_dict": data,+ "api_base": api_base,+ "headers": headers,+ },+ )++ if aembedding is True:+ return self.aembedding( # type: ignore+ request_data=data,+ api_base=api_base,+ headers=headers,+ model=model,+ custom_llm_provider=custom_llm_provider,+ provider_config=provider_config,+ model_response=model_response,+ logging_obj=logging_obj,+ api_key=api_key,+ timeout=timeout,+ client=client,+ )++ if client is None or not isinstance(client, HTTPHandler):+ sync_httpx_client = _get_httpx_client()+ else:+ sync_httpx_client = client++ try:+ response = sync_httpx_client.post(+ url=api_base,+ headers=headers,+ data=json.dumps(data),+ timeout=timeout,+ )+ except Exception as e:+ raise self._handle_error(+ e=e,+ provider_config=provider_config,+ )++ return provider_config.transform_embedding_response(+ model=model,+ raw_response=response,+ model_response=model_response,+ logging_obj=logging_obj,+ api_key=api_key,+ request_data=data,+ )++ async def aembedding(+ self,+ request_data: dict,+ api_base: str,+ headers: dict,+ model: str,+ custom_llm_provider: str,+ provider_config: BaseEmbeddingConfig,+ model_response: EmbeddingResponse,+ logging_obj: LiteLLMLoggingObj,+ api_key: Optional[str] = None,+ timeout: Optional[Union[float, httpx.Timeout]] = None,+ client: Optional[Union[HTTPHandler, AsyncHTTPHandler]] = None,+ ) -> EmbeddingResponse:+ if client is None or not isinstance(client, AsyncHTTPHandler):+ async_httpx_client = get_async_httpx_client(+ llm_provider=litellm.LlmProviders(custom_llm_provider)+ )+ else:+ async_httpx_client = client++ try:+ response = await async_httpx_client.post(+ url=api_base,+ headers=headers,+ data=json.dumps(request_data),+ timeout=timeout,+ )+ except Exception as e:+ raise self._handle_error(e=e, provider_config=provider_config)++ return provider_config.transform_embedding_response(+ model=model,+ raw_response=response,+ model_response=model_response,+ logging_obj=logging_obj,+ api_key=api_key,+ request_data=request_data,+ )+def _handle_error(self, e: Exception, provider_config: BaseConfig):status_code = getattr(e, "status_code", 500)error_headers = getattr(e, "headers", None)@@ -421,6 +556,3 @@ class BaseLLMHTTPHandler:status_code=status_code,headers=error_headers,)-- def embedding(self):- passdiff --git a/litellm/llms/huggingface/chat/transformation.py b/litellm/llms/huggingface/chat/transformation.pyindex 8238d1be411..c1bdc9ca673 100644--- a/litellm/llms/huggingface/chat/transformation.py+++ b/litellm/llms/huggingface/chat/transformation.py@@ -16,7 +16,7 @@ from litellm.litellm_core_utils.prompt_templates.factory import (prompt_factory,)from litellm.litellm_core_utils.streaming_handler import CustomStreamWrapper-from litellm.llms.base_llm.transformation import BaseConfig, BaseLLMException+from litellm.llms.base_llm.chat.transformation import BaseConfig, BaseLLMExceptionfrom litellm.secret_managers.main import get_secret_strfrom litellm.types.llms.openai import AllMessageValuesfrom litellm.types.utils import Choices, Message, ModelResponse, Usagediff --git a/litellm/llms/huggingface/common_utils.py b/litellm/llms/huggingface/common_utils.pyindex c63a4a0d1d5..d793b29874f 100644--- a/litellm/llms/huggingface/common_utils.py+++ b/litellm/llms/huggingface/common_utils.py@@ -2,7 +2,7 @@ from typing import Literal, Optional, Unionimport httpx-from litellm.llms.base_llm.transformation import BaseLLMException+from litellm.llms.base_llm.chat.transformation import BaseLLMExceptionclass HuggingfaceError(BaseLLMException):diff --git a/litellm/llms/maritalk.py b/litellm/llms/maritalk.pyindex 10df36394b3..1c7c882fa25 100644--- a/litellm/llms/maritalk.py+++ b/litellm/llms/maritalk.py@@ -9,7 +9,7 @@ from typing import Any, Callable, List, Optional, Unionfrom httpx._models import Headersimport litellm-from litellm.llms.base_llm.transformation import BaseLLMException+from litellm.llms.base_llm.chat.transformation import BaseLLMExceptionfrom litellm.llms.openai.chat.gpt_transformation import OpenAIGPTConfigfrom litellm.utils import Choices, Message, ModelResponse, Usagediff --git a/litellm/llms/nlp_cloud/chat/handler.py b/litellm/llms/nlp_cloud/chat/handler.pyindex e82086ebf3f..959832ab880 100644--- a/litellm/llms/nlp_cloud/chat/handler.py+++ b/litellm/llms/nlp_cloud/chat/handler.py@@ -8,7 +8,7 @@ from typing import Any, Callable, List, Optional, Unionimport httpximport litellm-from litellm.llms.base_llm.transformation import BaseConfig, BaseLLMException+from litellm.llms.base_llm.chat.transformation import BaseConfig, BaseLLMExceptionfrom litellm.llms.custom_httpx.http_handler import (AsyncHTTPHandler,HTTPHandler,diff --git a/litellm/llms/nlp_cloud/chat/transformation.py b/litellm/llms/nlp_cloud/chat/transformation.pyindex e547f38d22c..42bef0f4e84 100644--- a/litellm/llms/nlp_cloud/chat/transformation.py+++ b/litellm/llms/nlp_cloud/chat/transformation.py@@ -4,8 +4,10 @@ from typing import TYPE_CHECKING, Any, List, Optional, Unionimport httpx-from litellm.llms.base_llm.transformation import BaseConfig, BaseLLMException-from litellm.litellm_core_utils.prompt_templates.common_utils import convert_content_list_to_str+from litellm.litellm_core_utils.prompt_templates.common_utils import (+ convert_content_list_to_str,+)+from litellm.llms.base_llm.chat.transformation import BaseConfig, BaseLLMExceptionfrom litellm.types.llms.openai import AllMessageValuesfrom litellm.utils import ModelResponse, Usagediff --git a/litellm/llms/nlp_cloud/common_utils.py b/litellm/llms/nlp_cloud/common_utils.pyindex 5488a2fd7af..232f56c9709 100644--- a/litellm/llms/nlp_cloud/common_utils.py+++ b/litellm/llms/nlp_cloud/common_utils.py@@ -2,7 +2,7 @@ from typing import Optional, Unionimport httpx-from litellm.llms.base_llm.transformation import BaseLLMException+from litellm.llms.base_llm.chat.transformation import BaseLLMExceptionclass NLPCloudError(BaseLLMException):diff --git a/litellm/llms/ollama/common_utils.py b/litellm/llms/ollama/common_utils.pyindex 38f82ee7dc8..5cf213950c1 100644--- a/litellm/llms/ollama/common_utils.py+++ b/litellm/llms/ollama/common_utils.py@@ -2,7 +2,7 @@ from typing import Unionimport httpx-from litellm.llms.base_llm.transformation import BaseLLMException+from litellm.llms.base_llm.chat.transformation import BaseLLMExceptionclass OllamaError(BaseLLMException):diff --git a/litellm/llms/ollama/completion/transformation.py b/litellm/llms/ollama/completion/transformation.pyindex c77fe7f0282..3ba3d29587f 100644--- a/litellm/llms/ollama/completion/transformation.py+++ b/litellm/llms/ollama/completion/transformation.py@@ -13,7 +13,7 @@ from litellm.litellm_core_utils.prompt_templates.factory import (ollama_pt,)from litellm.llms.base_llm.base_model_iterator import BaseModelResponseIterator-from litellm.llms.base_llm.transformation import BaseConfig, BaseLLMException+from litellm.llms.base_llm.chat.transformation import BaseConfig, BaseLLMExceptionfrom litellm.secret_managers.main import get_secret_strfrom litellm.types.llms.openai import (AllMessageValues,diff --git a/litellm/llms/oobabooga/chat/transformation.py b/litellm/llms/oobabooga/chat/transformation.pyindex 6780991bea3..79ccca840ce 100644--- a/litellm/llms/oobabooga/chat/transformation.py+++ b/litellm/llms/oobabooga/chat/transformation.py@@ -6,7 +6,7 @@ from typing import TYPE_CHECKING, Any, List, Optional, Unionimport httpximport litellm-from litellm.llms.base_llm.transformation import BaseConfig, BaseLLMException+from litellm.llms.base_llm.chat.transformation import BaseConfig, BaseLLMExceptionfrom litellm.llms.openai.chat.gpt_transformation import OpenAIGPTConfigfrom litellm.types.llms.openai import AllMessageValuesfrom litellm.types.utils import Choices, Message, ModelResponse, Usagediff --git a/litellm/llms/oobabooga/common_utils.py b/litellm/llms/oobabooga/common_utils.pyindex 3612fed4070..82f8cda9511 100644--- a/litellm/llms/oobabooga/common_utils.py+++ b/litellm/llms/oobabooga/common_utils.py@@ -2,7 +2,7 @@ from typing import Optional, Unionimport httpx-from litellm.llms.base_llm.transformation import BaseLLMException+from litellm.llms.base_llm.chat.transformation import BaseLLMExceptionclass OobaboogaError(BaseLLMException):diff --git a/litellm/llms/openai/chat/gpt_transformation.py b/litellm/llms/openai/chat/gpt_transformation.pyindex 87b66ddc69b..c6e63edb8c5 100644--- a/litellm/llms/openai/chat/gpt_transformation.py+++ b/litellm/llms/openai/chat/gpt_transformation.py@@ -8,7 +8,7 @@ from typing import TYPE_CHECKING, Any, List, Optional, Union, castimport httpximport litellm-from litellm.llms.base_llm.transformation import BaseConfig, BaseLLMException+from litellm.llms.base_llm.chat.transformation import BaseConfig, BaseLLMExceptionfrom litellm.types.llms.openai import AllMessageValues, ChatCompletionUserMessagefrom litellm.types.utils import ModelResponsediff --git a/litellm/llms/openai/common_utils.py b/litellm/llms/openai/common_utils.pyindex e5b926f6aa5..87857f7ced4 100644--- a/litellm/llms/openai/common_utils.py+++ b/litellm/llms/openai/common_utils.py@@ -8,7 +8,7 @@ from typing import Any, Dict, List, Optional, Unionimport httpximport openai-from litellm.llms.base_llm.transformation import BaseLLMException+from litellm.llms.base_llm.chat.transformation import BaseLLMExceptionclass OpenAIError(BaseLLMException):diff --git a/litellm/llms/openai/completion/transformation.py b/litellm/llms/openai/completion/transformation.pyindex e7ff85d557f..85a9115c745 100644--- a/litellm/llms/openai/completion/transformation.py+++ b/litellm/llms/openai/completion/transformation.py@@ -6,7 +6,10 @@ import typesfrom typing import List, Optional, Union, castimport litellm-from litellm.llms.base_llm.transformation import BaseConfig+from litellm.litellm_core_utils.prompt_templates.common_utils import (+ convert_content_list_to_str,+)+from litellm.llms.base_llm.chat.transformation import BaseConfigfrom litellm.types.llms.openai import (AllMessageValues,AllPromptValues,@@ -14,7 +17,6 @@ from litellm.types.llms.openai import ()from litellm.types.utils import Choices, Message, ModelResponse, TextCompletionResponse-from litellm.litellm_core_utils.prompt_templates.common_utils import convert_content_list_to_strfrom ..chat.gpt_transformation import OpenAIGPTConfigfrom ..common_utils import OpenAIErrorfrom .utils import is_tokens_or_list_of_tokensdiff --git a/litellm/llms/openai/openai.py b/litellm/llms/openai/openai.pyindex b2d14a3187b..ffac461f385 100644--- a/litellm/llms/openai/openai.py+++ b/litellm/llms/openai/openai.py@@ -32,7 +32,7 @@ from litellm.litellm_core_utils.prompt_templates.factory import (custom_prompt,prompt_factory,)-from litellm.llms.base_llm.transformation import BaseConfig, BaseLLMException+from litellm.llms.base_llm.chat.transformation import BaseConfig, BaseLLMExceptionfrom litellm.llms.custom_httpx.http_handler import _DEFAULT_TTL_FOR_HTTPX_CLIENTSfrom litellm.secret_managers.main import get_secret_strfrom litellm.types.utils import (diff --git a/litellm/llms/petals/common_utils.py b/litellm/llms/petals/common_utils.pyindex 9df4bad8ebd..bffee338f2b 100644--- a/litellm/llms/petals/common_utils.py+++ b/litellm/llms/petals/common_utils.py@@ -2,7 +2,7 @@ from typing import Unionfrom httpx import Headers-from litellm.llms.base_llm.transformation import BaseLLMException+from litellm.llms.base_llm.chat.transformation import BaseLLMExceptionclass PetalsError(BaseLLMException):diff --git a/litellm/llms/petals/completion/transformation.py b/litellm/llms/petals/completion/transformation.pyindex 52b8cd178dd..76b7df72352 100644--- a/litellm/llms/petals/completion/transformation.py+++ b/litellm/llms/petals/completion/transformation.py@@ -4,7 +4,7 @@ from typing import Any, List, Optional, Unionfrom httpx import Headers, Responseimport litellm-from litellm.llms.base_llm.transformation import (+from litellm.llms.base_llm.chat.transformation import (BaseConfig,BaseLLMException,LiteLLMLoggingObj,diff --git a/litellm/llms/predibase/chat/transformation.py b/litellm/llms/predibase/chat/transformation.pyindex c6b9451dd3b..016b9e700f7 100644--- a/litellm/llms/predibase/chat/transformation.py+++ b/litellm/llms/predibase/chat/transformation.py@@ -3,7 +3,7 @@ from typing import TYPE_CHECKING, Any, List, Literal, Optional, Unionfrom httpx import Headers, Response-from litellm.llms.base_llm.transformation import BaseConfig, BaseLLMException+from litellm.llms.base_llm.chat.transformation import BaseConfig, BaseLLMExceptionfrom litellm.types.llms.openai import AllMessageValuesfrom litellm.types.utils import ModelResponsediff --git a/litellm/llms/predibase/common_utils.py b/litellm/llms/predibase/common_utils.pyindex f1506ce2196..2dad5861208 100644--- a/litellm/llms/predibase/common_utils.py+++ b/litellm/llms/predibase/common_utils.py@@ -2,7 +2,7 @@ from typing import Optional, Unionimport httpx-from litellm.llms.base_llm.transformation import BaseLLMException+from litellm.llms.base_llm.chat.transformation import BaseLLMExceptionclass PredibaseError(BaseLLMException):diff --git a/litellm/llms/replicate/chat/transformation.py b/litellm/llms/replicate/chat/transformation.pyindex 184a2cb8098..b4d8b008d57 100644--- a/litellm/llms/replicate/chat/transformation.py+++ b/litellm/llms/replicate/chat/transformation.py@@ -4,9 +4,14 @@ from typing import TYPE_CHECKING, Any, List, Optional, Unionimport httpximport litellm-from litellm.llms.base_llm.transformation import BaseConfig, BaseLLMException-from litellm.litellm_core_utils.prompt_templates.common_utils import convert_content_list_to_str-from litellm.litellm_core_utils.prompt_templates.factory import custom_prompt, prompt_factory+from litellm.litellm_core_utils.prompt_templates.common_utils import (+ convert_content_list_to_str,+)+from litellm.litellm_core_utils.prompt_templates.factory import (+ custom_prompt,+ prompt_factory,+)+from litellm.llms.base_llm.chat.transformation import BaseConfig, BaseLLMExceptionfrom litellm.types.llms.openai import AllMessageValuesfrom litellm.types.utils import Choices, Message, ModelResponse, Usagefrom litellm.utils import token_counterdiff --git a/litellm/llms/replicate/common_utils.py b/litellm/llms/replicate/common_utils.pyindex 98a5936ccfe..c52b47a46aa 100644--- a/litellm/llms/replicate/common_utils.py+++ b/litellm/llms/replicate/common_utils.py@@ -2,7 +2,7 @@ from typing import Optional, Unionimport httpx-from litellm.llms.base_llm.transformation import BaseLLMException+from litellm.llms.base_llm.chat.transformation import BaseLLMExceptionclass ReplicateError(BaseLLMException):diff --git a/litellm/llms/sagemaker/chat/transformation.py b/litellm/llms/sagemaker/chat/transformation.pyindex f5df6e279da..42c7e0d5fcf 100644--- a/litellm/llms/sagemaker/chat/transformation.py+++ b/litellm/llms/sagemaker/chat/transformation.py@@ -11,7 +11,7 @@ from typing import Unionfrom httpx._models import Headers-from litellm.llms.base_llm.transformation import BaseLLMException+from litellm.llms.base_llm.chat.transformation import BaseLLMExceptionfrom ...openai.chat.gpt_transformation import OpenAIGPTConfigfrom ..common_utils import SagemakerErrordiff --git a/litellm/llms/sagemaker/common_utils.py b/litellm/llms/sagemaker/common_utils.pyindex 8fa450a8d57..49e4989ff15 100644--- a/litellm/llms/sagemaker/common_utils.py+++ b/litellm/llms/sagemaker/common_utils.py@@ -4,7 +4,7 @@ from typing import AsyncIterator, Iterator, List, Optional, Unionimport httpxfrom litellm import verbose_logger-from litellm.llms.base_llm.transformation import BaseLLMException+from litellm.llms.base_llm.chat.transformation import BaseLLMExceptionfrom litellm.types.utils import GenericStreamingChunk as GChunkfrom litellm.types.utils import StreamingChatCompletionChunkdiff --git a/litellm/llms/sagemaker/completion/transformation.py b/litellm/llms/sagemaker/completion/transformation.pyindex 0a91819b7ba..6e4d2ac9c54 100644--- a/litellm/llms/sagemaker/completion/transformation.py+++ b/litellm/llms/sagemaker/completion/transformation.py@@ -17,7 +17,7 @@ from litellm.litellm_core_utils.prompt_templates.factory import (custom_prompt,prompt_factory,)-from litellm.llms.base_llm.transformation import BaseConfig, BaseLLMException+from litellm.llms.base_llm.chat.transformation import BaseConfig, BaseLLMExceptionfrom litellm.types.llms.openai import AllMessageValuesfrom litellm.types.utils import ModelResponse, Usagediff --git a/litellm/llms/triton/common_utils.py b/litellm/llms/triton/common_utils.pyindex 64ce011b958..d5372eee00c 100644--- a/litellm/llms/triton/common_utils.py+++ b/litellm/llms/triton/common_utils.py@@ -2,7 +2,7 @@ from typing import Optional, Unionimport httpx-from litellm.llms.base_llm.transformation import BaseLLMException+from litellm.llms.base_llm.chat.transformation import BaseLLMExceptionclass TritonError(BaseLLMException):diff --git a/litellm/llms/triton/completion/transformation.py b/litellm/llms/triton/completion/transformation.pyindex fafdc027eaf..381af4953a1 100644--- a/litellm/llms/triton/completion/transformation.py+++ b/litellm/llms/triton/completion/transformation.py@@ -7,7 +7,7 @@ from typing import Any, Dict, List, Optional, Unionfrom httpx import Headers, Responsefrom litellm.litellm_core_utils.prompt_templates.factory import prompt_factory-from litellm.llms.base_llm.transformation import (+from litellm.llms.base_llm.chat.transformation import (BaseConfig,BaseLLMException,LiteLLMLoggingObj,diff --git a/litellm/llms/vertex_ai/common_utils.py b/litellm/llms/vertex_ai/common_utils.pyindex 5fef37d313b..a412a1f0dbd 100644--- a/litellm/llms/vertex_ai/common_utils.py+++ b/litellm/llms/vertex_ai/common_utils.py@@ -3,7 +3,7 @@ from typing import Dict, List, Literal, Optional, Tuple, Unionimport httpxfrom litellm import supports_response_schema, supports_system_messages, verbose_logger-from litellm.llms.base_llm.transformation import BaseLLMException+from litellm.llms.base_llm.chat.transformation import BaseLLMExceptionfrom litellm.types.llms.vertex_ai import PartTypediff --git a/litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py b/litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.pyindex 8c534a4fa79..c75cff1430f 100644--- a/litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py+++ b/litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py@@ -34,7 +34,7 @@ from litellm.litellm_core_utils.prompt_templates.factory import (convert_generic_image_chunk_to_openai_image_obj,convert_to_anthropic_image_obj,)-from litellm.llms.base_llm.transformation import BaseConfig, BaseLLMException+from litellm.llms.base_llm.chat.transformation import BaseConfig, BaseLLMExceptionfrom litellm.llms.custom_httpx.http_handler import (AsyncHTTPHandler,HTTPHandler,diff --git a/litellm/llms/voyage/embedding/transformation.py b/litellm/llms/voyage/embedding/transformation.pynew file mode 100644index 00000000000..6d4fb89ddc5--- /dev/null+++ b/litellm/llms/voyage/embedding/transformation.py@@ -0,0 +1,141 @@+import json+from typing import Any, List, Optional, Tuple, Union++import httpx++import litellm+from litellm._logging import verbose_logger+from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObj+from litellm.llms.base_llm.chat.transformation import BaseLLMException+from litellm.llms.base_llm.embedding.transformation import BaseEmbeddingConfig+from litellm.secret_managers.main import get_secret_str+from litellm.types.llms.openai import AllMessageValues+from litellm.types.utils import EmbeddingResponse, ModelResponse, Usage+++class VoyageError(BaseLLMException):+ def __init__(+ self,+ status_code: int,+ message: str,+ headers: Union[dict, httpx.Headers] = {},+ ):+ self.status_code = status_code+ self.message = message+ self.request = httpx.Request(+ method="POST", url="https://api.voyageai.com/v1/embeddings"+ )+ self.response = httpx.Response(status_code=status_code, request=self.request)+ super().__init__(+ status_code=status_code,+ message=message,+ headers=headers,+ )+++class VoyageEmbeddingConfig(BaseEmbeddingConfig):+ """+ Reference: https://docs.voyageai.com/reference/embeddings-api+ """++ def __init__(self) -> None:+ pass++ def get_complete_url(self, api_base: Optional[str], model: str) -> str:+ if api_base:+ if not api_base.endswith("/embeddings"):+ api_base = f"{api_base}/embeddings"+ return api_base+ return "https://api.voyageai.com/v1/embeddings"++ def get_supported_openai_params(self, model: str) -> list:+ return [+ "encoding_format",+ "dimensions",+ ]++ def map_openai_params(+ self,+ non_default_params: dict,+ optional_params: dict,+ model: str,+ drop_params: bool,+ ) -> dict:+ """+ Map OpenAI params to Voyage params++ Reference: https://docs.voyageai.com/reference/embeddings-api+ """+ if "encoding_format" in non_default_params:+ optional_params["encoding_format"] = non_default_params["encoding_format"]+ if "dimensions" in non_default_params:+ optional_params["output_dimension"] = non_default_params["dimensions"]+ return optional_params++ def validate_environment(+ self,+ headers: dict,+ model: str,+ messages: List[AllMessageValues],+ optional_params: dict,+ api_key: Optional[str] = None,+ ) -> dict:+ if api_key is None:+ api_key = (+ get_secret_str("VOYAGE_API_KEY")+ or get_secret_str("VOYAGE_AI_API_KEY")+ or get_secret_str("VOYAGE_AI_TOKEN")+ )+ return {+ "Authorization": f"Bearer {api_key}",+ }++ def transform_embedding_request(+ self,+ model: str,+ input: Union[str, List[str], List[float], List[List[float]]],+ optional_params: dict,+ headers: dict,+ ) -> dict:+ return {+ "input": input,+ "model": model,+ **optional_params,+ }++ def transform_embedding_response(+ self,+ model: str,+ raw_response: httpx.Response,+ model_response: EmbeddingResponse,+ logging_obj: LiteLLMLoggingObj,+ api_key: Optional[str] = None,+ request_data: dict = {},+ optional_params: dict = {},+ litellm_params: dict = {},+ ) -> EmbeddingResponse:+ try:+ raw_response_json = raw_response.json()+ except Exception:+ raise VoyageError(+ message=raw_response.text, status_code=raw_response.status_code+ )++ # model_response.usage+ model_response.model = raw_response_json.get("model")+ model_response.data = raw_response_json.get("data")+ model_response.object = raw_response_json.get("object")++ usage = Usage(+ prompt_tokens=raw_response_json.get("usage", {}).get("prompt_tokens", 0),+ total_tokens=raw_response_json.get("usage", {}).get("total_tokens", 0),+ )+ model_response.usage = usage+ return model_response++ def get_error_class(+ self, error_message: str, status_code: int, headers: Union[dict, httpx.Headers]+ ) -> BaseLLMException:+ return VoyageError(+ message=error_message, status_code=status_code, headers=headers+ )diff --git a/litellm/llms/watsonx/common_utils.py b/litellm/llms/watsonx/common_utils.pyindex b270f2d82bf..82881fe796e 100644--- a/litellm/llms/watsonx/common_utils.py+++ b/litellm/llms/watsonx/common_utils.py@@ -5,7 +5,7 @@ import httpximport litellmfrom litellm import verbose_loggerfrom litellm.caching import InMemoryCache-from litellm.llms.base_llm.transformation import BaseLLMException+from litellm.llms.base_llm.chat.transformation import BaseLLMExceptionfrom litellm.secret_managers.main import get_secret_strfrom litellm.types.llms.watsonx import WatsonXAPIParamsdiff --git a/litellm/llms/watsonx/completion/transformation.py b/litellm/llms/watsonx/completion/transformation.pyindex 9e68be930e2..566b6ad2ce5 100644--- a/litellm/llms/watsonx/completion/transformation.py+++ b/litellm/llms/watsonx/completion/transformation.py@@ -24,7 +24,8 @@ from typing import (import httpximport litellm-from litellm.llms.base_llm.transformation import BaseLLMException+from litellm.litellm_core_utils.prompt_templates import factory as ptf+from litellm.llms.base_llm.chat.transformation import BaseLLMExceptionfrom litellm.llms.custom_httpx.http_handler import (AsyncHTTPHandler,get_async_httpx_client,@@ -35,8 +36,7 @@ from litellm.types.llms.watsonx import WatsonXAIEndpointfrom litellm.utils import EmbeddingResponse, ModelResponse, Usage, map_finish_reasonfrom ...base import BaseLLM-from ...base_llm.transformation import BaseConfig-from litellm.litellm_core_utils.prompt_templates import factory as ptf+from ...base_llm.chat.transformation import BaseConfigfrom ..common_utils import WatsonXAIError, _get_api_params, generate_iam_tokenif TYPE_CHECKING:diff --git a/litellm/main.py b/litellm/main.pyindex 6a80a484524..ba7e1303ac8 100644--- a/litellm/main.py+++ b/litellm/main.py@@ -3058,6 +3058,7 @@ async def aembedding(*args, **kwargs) -> EmbeddingResponse:or custom_llm_provider == "together_ai"or custom_llm_provider == "openai_like"or custom_llm_provider == "jina_ai"+ or custom_llm_provider == "voyage"): # currently implemented aiohttp calls for just azure and openai, soon all.# Await normallyinit_response = await loop.run_in_executor(None, func_with_context)@@ -3632,10 +3633,10 @@ def embedding( # noqa: PLR0915aembedding=aembedding,)elif custom_llm_provider == "voyage":- api_key = api_key or litellm.api_key or get_secret_str("VOYAGE_API_KEY")- response = openai_chat_completions.embedding(+ response = base_llm_http_handler.embedding(model=model,input=input,+ custom_llm_provider=custom_llm_provider,api_base=api_base,api_key=api_key,logging_obj=logging,diff --git a/litellm/utils.py b/litellm/utils.pyindex 256329fabbf..8baafe21ed7 100644--- a/litellm/utils.py+++ b/litellm/utils.py@@ -168,7 +168,8 @@ from typing import (from openai import OpenAIError as OriginalError-from litellm.llms.base_llm.transformation import BaseConfig+from litellm.llms.base_llm.chat.transformation import BaseConfig+from litellm.llms.base_llm.embedding.transformation import BaseEmbeddingConfigfrom ._logging import verbose_loggerfrom .caching.caching import (@@ -2377,6 +2378,21 @@ def get_optional_params_embeddings( # noqa: PLR0915)final_params = {**optional_params, **kwargs}return final_params+ elif custom_llm_provider == "voyage":+ supported_params = get_supported_openai_params(+ model=model,+ custom_llm_provider="voyage",+ request_type="embeddings",+ )+ _check_valid_arg(supported_params=supported_params)+ optional_params = litellm.VoyageEmbeddingConfig().map_openai_params(+ non_default_params=non_default_params,+ optional_params={},+ model=model,+ drop_params=drop_params if drop_params is not None else False,+ )+ final_params = {**optional_params, **kwargs}+ return final_paramselif custom_llm_provider == "fireworks_ai":supported_params = get_supported_openai_params(model=model,@@ -6200,6 +6216,15 @@ class ProviderConfigManager:return litellm.PetalsConfig()return litellm.OpenAIGPTConfig()+ @staticmethod+ def get_provider_embedding_config(+ model: str,+ provider: LlmProviders,+ ) -> BaseEmbeddingConfig:+ if litellm.LlmProviders.VOYAGE == provider:+ return litellm.VoyageEmbeddingConfig()+ raise ValueError(f"Provider {provider} does not support embedding config")+def get_end_user_id_for_cost_tracking(litellm_params: dict,diff --git a/tests/llm_translation/base_embedding_unit_tests.py b/tests/llm_translation/base_embedding_unit_tests.pyindex 94edeccdf36..b06ca31e685 100644--- a/tests/llm_translation/base_embedding_unit_tests.py+++ b/tests/llm_translation/base_embedding_unit_tests.py@@ -59,6 +59,10 @@ class BaseLLMEmbeddingTest(ABC):print("async embedding response: ", response)+ from openai.types.create_embedding_response import CreateEmbeddingResponse++ CreateEmbeddingResponse.model_validate(response.model_dump())+def test_embedding_optional_params_max_retries(self):embedding_call_args = self.get_base_embedding_call_args()optional_params = get_optional_params_embeddings(diff --git a/tests/llm_translation/test_voyage_ai.py b/tests/llm_translation/test_voyage_ai.pynew file mode 100644index 00000000000..ca49d53c393--- /dev/null+++ b/tests/llm_translation/test_voyage_ai.py@@ -0,0 +1,56 @@+import json+import os+import sys+from datetime import datetime+from unittest.mock import AsyncMock+import pytest++sys.path.insert(+ 0, os.path.abspath("../..")+) # Adds the parent directory to the system path+++from base_embedding_unit_tests import BaseLLMEmbeddingTest+import litellm+from litellm.llms.custom_httpx.http_handler import HTTPHandler+from unittest.mock import patch, MagicMock+++class TestVoyageAI(BaseLLMEmbeddingTest):+ def get_custom_llm_provider(self) -> litellm.LlmProviders:+ return litellm.LlmProviders.VOYAGE++ def get_base_embedding_call_args(self) -> dict:+ return {+ "model": "voyage/voyage-3-lite",+ }+++def test_voyage_ai_embedding_extra_params():+ try:++ client = HTTPHandler()+ litellm.set_verbose = True++ with patch.object(client, "post") as mock_client:+ response = litellm.embedding(+ model="voyage/voyage-3-lite",+ input=["a"],+ dimensions=512,+ input_type="document",+ client=client,+ )++ mock_client.assert_called_once()+ json_data = json.loads(mock_client.call_args.kwargs["data"])++ print("request data to voyage ai", json.dumps(json_data, indent=4))++ # Assert the request parameters+ assert json_data["input"] == ["a"]+ assert json_data["model"] == "voyage-3-lite"+ assert json_data["output_dimension"] == 512+ assert json_data["input_type"] == "document"++ except Exception as e:+ pytest.fail(f"Error occurred: {e}")diff --git a/tests/local_testing/test_config.py b/tests/local_testing/test_config.pyindex 213f5095eaa..88ea633df75 100644--- a/tests/local_testing/test_config.py+++ b/tests/local_testing/test_config.py@@ -348,7 +348,7 @@ async def test_add_and_delete_deployments(llm_router, model_list_flag_value):from litellm import LITELLM_CHAT_PROVIDERS, LlmProvidersfrom litellm.utils import ProviderConfigManager-from litellm.llms.base_llm.transformation import BaseConfig+from litellm.llms.base_llm.chat.transformation import BaseConfigdef _check_provider_config(config: BaseConfig, provider: LlmProviders):