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
Add: transformation file for minmax anthropic endpoint
Sameer Kankute4bae4d00f5cf
diff --git a/litellm/litellm_core_utils/get_llm_provider_logic.py b/litellm/litellm_core_utils/get_llm_provider_logic.pyindex a23fce891b9..a707bdedad3 100644--- a/litellm/litellm_core_utils/get_llm_provider_logic.py+++ b/litellm/litellm_core_utils/get_llm_provider_logic.py@@ -4,8 +4,8 @@ import httpximport litellmfrom litellm.constants import REPLICATE_MODEL_NAME_WITH_ID_LENGTH-from litellm.secret_managers.main import get_secret, get_secret_strfrom litellm.llms.openai_like.json_loader import JSONProviderRegistry+from litellm.secret_managers.main import get_secret, get_secret_strfrom ..types.router import LiteLLM_Params@@ -267,6 +267,9 @@ def get_llm_provider( # noqa: PLR0915elif endpoint == "api.moonshot.ai/v1":custom_llm_provider = "moonshot"dynamic_api_key = get_secret_str("MOONSHOT_API_KEY")+ elif endpoint == "api.minimax.io/anthropic" or endpoint == "api.minimaxi.com/anthropic":+ custom_llm_provider = "minimax"+ dynamic_api_key = get_secret_str("MINIMAX_API_KEY")elif endpoint == "platform.publicai.co/v1":custom_llm_provider = "publicai"dynamic_api_key = get_secret_str("PUBLICAI_API_KEY")diff --git a/litellm/types/utils.py b/litellm/types/utils.pyindex 3416459bc28..47d9ece5e37 100644--- a/litellm/types/utils.py+++ b/litellm/types/utils.py@@ -3014,6 +3014,7 @@ class LlmProviders(str, Enum):AMAZON_NOVA = "amazon_nova"A2A_AGENT = "a2a_agent"LANGGRAPH = "langgraph"+ MINIMAX = "minimax"# Create a set of all provider values for quick lookupdiff --git a/litellm/utils.py b/litellm/utils.pyindex 805fbafcfce..c0e4dd8c052 100644--- a/litellm/utils.py+++ b/litellm/utils.py@@ -7501,6 +7501,12 @@ class ProviderConfigManager:)return AzureAnthropicMessagesConfig()+ elif litellm.LlmProviders.MINIMAX == provider:+ from litellm.llms.minimax.messages.transformation import (+ MinimaxMessagesConfig,+ )++ return MinimaxMessagesConfig()return None@staticmethod