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 new chat model metadata (#27313)
ishaan-berri924c1418437e
diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.jsonindex 7946e2dceef..d609a3d1f4b 100644--- a/litellm/model_prices_and_context_window_backup.json+++ b/litellm/model_prices_and_context_window_backup.json@@ -28874,6 +28874,19 @@"mode": "chat","output_cost_per_token": 0.0},+ "sambanova/MiniMax-M2.7": {+ "input_cost_per_token": 3e-07,+ "litellm_provider": "sambanova",+ "max_input_tokens": 204800,+ "max_output_tokens": 131072,+ "max_tokens": 131072,+ "mode": "chat",+ "output_cost_per_token": 1.2e-06,+ "source": "https://cloud.sambanova.ai/plans/pricing",+ "supports_function_calling": true,+ "supports_reasoning": true,+ "supports_tool_choice": true+ },"sambanova/DeepSeek-R1": {"input_cost_per_token": 5e-06,"litellm_provider": "sambanova",diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.jsonindex 9c085c2c992..a8630eb0f32 100644--- a/model_prices_and_context_window.json+++ b/model_prices_and_context_window.json@@ -28879,6 +28879,19 @@"mode": "chat","output_cost_per_token": 0.0},+ "sambanova/MiniMax-M2.7": {+ "input_cost_per_token": 3e-07,+ "litellm_provider": "sambanova",+ "max_input_tokens": 204800,+ "max_output_tokens": 131072,+ "max_tokens": 131072,+ "mode": "chat",+ "output_cost_per_token": 1.2e-06,+ "source": "https://cloud.sambanova.ai/plans/pricing",+ "supports_function_calling": true,+ "supports_reasoning": true,+ "supports_tool_choice": true+ },"sambanova/DeepSeek-R1": {"input_cost_per_token": 5e-06,"litellm_provider": "sambanova",diff --git a/tests/litellm/test_sambanova_model_metadata.py b/tests/litellm/test_sambanova_model_metadata.pynew file mode 100644index 00000000000..bc31bfb0af2--- /dev/null+++ b/tests/litellm/test_sambanova_model_metadata.py@@ -0,0 +1,29 @@+import json+from pathlib import Path++from litellm.litellm_core_utils.get_llm_provider_logic import get_llm_provider+++def test_sambanova_minimax_m27_model_info():+ model = "sambanova/MiniMax-M2.7"+ json_path = Path(__file__).parents[2] / "model_prices_and_context_window.json"+ with open(json_path) as f:+ model_cost = json.load(f)++ info = model_cost.get(model)+ assert (+ info is not None+ ), f"{model} not found in model_prices_and_context_window.json"+ assert info["litellm_provider"] == "sambanova"+ assert info["mode"] == "chat"+ assert info["input_cost_per_token"] > 0+ assert info["output_cost_per_token"] > 0+ assert info["max_input_tokens"] == 204800+ assert info["max_output_tokens"] == 131072+ assert info["supports_function_calling"] is True+ assert info["supports_reasoning"] is True+ assert info["supports_tool_choice"] is True++ routed_model, provider, _, _ = get_llm_provider(model=model)+ assert routed_model == "MiniMax-M2.7"+ assert provider == "sambanova"