Add: transformation file for minmax anthropic endpoint

This commit is contained in:
Sameer Kankute 2025-12-23 16:09:35 +05:30
parent ca28ab8a0a
commit 4bae4d00f5
3 changed files with 11 additions and 1 deletions

View file

@ -4,8 +4,8 @@ import httpx
import litellm
from litellm.constants import REPLICATE_MODEL_NAME_WITH_ID_LENGTH
from litellm.secret_managers.main import get_secret, get_secret_str
from litellm.llms.openai_like.json_loader import JSONProviderRegistry
from litellm.secret_managers.main import get_secret, get_secret_str
from ..types.router import LiteLLM_Params
@ -267,6 +267,9 @@ def get_llm_provider( # noqa: PLR0915
elif 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")

View file

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

View file

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