mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-20 10:02:54 +00:00
feat(sambanova): add MiniMax-M3, fix max output tokens, remove retired models
This commit is contained in:
parent
c66c8288c3
commit
6a57936de3
3 changed files with 67 additions and 54 deletions
|
|
@ -45647,39 +45647,26 @@
|
|||
"supports_reasoning": true,
|
||||
"supports_tool_choice": true
|
||||
},
|
||||
"sambanova/DeepSeek-R1": {
|
||||
"input_cost_per_token": 5e-06,
|
||||
"sambanova/MiniMax-M3": {
|
||||
"input_cost_per_token": 6e-07,
|
||||
"litellm_provider": "sambanova",
|
||||
"max_input_tokens": 32768,
|
||||
"max_output_tokens": 32768,
|
||||
"max_tokens": 32768,
|
||||
"max_input_tokens": 1048576,
|
||||
"max_output_tokens": 1048576,
|
||||
"max_tokens": 1048576,
|
||||
"mode": "chat",
|
||||
"output_cost_per_token": 7e-06,
|
||||
"source": "https://cloud.sambanova.ai/plans/pricing"
|
||||
},
|
||||
"sambanova/Llama-4-Maverick-17B-128E-Instruct": {
|
||||
"input_cost_per_token": 6.3e-07,
|
||||
"litellm_provider": "sambanova",
|
||||
"max_input_tokens": 131072,
|
||||
"max_output_tokens": 131072,
|
||||
"max_tokens": 131072,
|
||||
"metadata": {
|
||||
"notes": "For vision models, images are converted to 6432 input tokens and are billed at that amount"
|
||||
},
|
||||
"mode": "chat",
|
||||
"output_cost_per_token": 1.8e-06,
|
||||
"output_cost_per_token": 2.4e-06,
|
||||
"source": "https://cloud.sambanova.ai/plans/pricing",
|
||||
"supports_function_calling": true,
|
||||
"supports_reasoning": true,
|
||||
"supports_response_schema": true,
|
||||
"supports_tool_choice": true,
|
||||
"supports_vision": true
|
||||
"supports_tool_choice": true
|
||||
},
|
||||
"sambanova/Meta-Llama-3.3-70B-Instruct": {
|
||||
"input_cost_per_token": 6e-07,
|
||||
"litellm_provider": "sambanova",
|
||||
"max_input_tokens": 131072,
|
||||
"max_output_tokens": 131072,
|
||||
"max_tokens": 131072,
|
||||
"max_output_tokens": 3072,
|
||||
"max_tokens": 3072,
|
||||
"mode": "chat",
|
||||
"output_cost_per_token": 1.2e-06,
|
||||
"source": "https://cloud.sambanova.ai/plans/pricing",
|
||||
|
|
@ -45688,9 +45675,9 @@
|
|||
"supports_tool_choice": true
|
||||
},
|
||||
"sambanova/DeepSeek-V3.1": {
|
||||
"max_tokens": 131072,
|
||||
"max_tokens": 7168,
|
||||
"max_input_tokens": 131072,
|
||||
"max_output_tokens": 131072,
|
||||
"max_output_tokens": 7168,
|
||||
"input_cost_per_token": 3e-06,
|
||||
"output_cost_per_token": 4.5e-06,
|
||||
"litellm_provider": "sambanova",
|
||||
|
|
@ -45714,9 +45701,9 @@
|
|||
"source": "https://cloud.sambanova.ai/plans/pricing"
|
||||
},
|
||||
"sambanova/DeepSeek-V3.2": {
|
||||
"max_tokens": 32768,
|
||||
"max_tokens": 7168,
|
||||
"max_input_tokens": 32768,
|
||||
"max_output_tokens": 32768,
|
||||
"max_output_tokens": 7168,
|
||||
"input_cost_per_token": 3e-06,
|
||||
"output_cost_per_token": 4.5e-06,
|
||||
"litellm_provider": "sambanova",
|
||||
|
|
|
|||
|
|
@ -45647,39 +45647,26 @@
|
|||
"supports_reasoning": true,
|
||||
"supports_tool_choice": true
|
||||
},
|
||||
"sambanova/DeepSeek-R1": {
|
||||
"input_cost_per_token": 5e-06,
|
||||
"sambanova/MiniMax-M3": {
|
||||
"input_cost_per_token": 6e-07,
|
||||
"litellm_provider": "sambanova",
|
||||
"max_input_tokens": 32768,
|
||||
"max_output_tokens": 32768,
|
||||
"max_tokens": 32768,
|
||||
"max_input_tokens": 1048576,
|
||||
"max_output_tokens": 1048576,
|
||||
"max_tokens": 1048576,
|
||||
"mode": "chat",
|
||||
"output_cost_per_token": 7e-06,
|
||||
"source": "https://cloud.sambanova.ai/plans/pricing"
|
||||
},
|
||||
"sambanova/Llama-4-Maverick-17B-128E-Instruct": {
|
||||
"input_cost_per_token": 6.3e-07,
|
||||
"litellm_provider": "sambanova",
|
||||
"max_input_tokens": 131072,
|
||||
"max_output_tokens": 131072,
|
||||
"max_tokens": 131072,
|
||||
"metadata": {
|
||||
"notes": "For vision models, images are converted to 6432 input tokens and are billed at that amount"
|
||||
},
|
||||
"mode": "chat",
|
||||
"output_cost_per_token": 1.8e-06,
|
||||
"output_cost_per_token": 2.4e-06,
|
||||
"source": "https://cloud.sambanova.ai/plans/pricing",
|
||||
"supports_function_calling": true,
|
||||
"supports_reasoning": true,
|
||||
"supports_response_schema": true,
|
||||
"supports_tool_choice": true,
|
||||
"supports_vision": true
|
||||
"supports_tool_choice": true
|
||||
},
|
||||
"sambanova/Meta-Llama-3.3-70B-Instruct": {
|
||||
"input_cost_per_token": 6e-07,
|
||||
"litellm_provider": "sambanova",
|
||||
"max_input_tokens": 131072,
|
||||
"max_output_tokens": 131072,
|
||||
"max_tokens": 131072,
|
||||
"max_output_tokens": 3072,
|
||||
"max_tokens": 3072,
|
||||
"mode": "chat",
|
||||
"output_cost_per_token": 1.2e-06,
|
||||
"source": "https://cloud.sambanova.ai/plans/pricing",
|
||||
|
|
@ -45688,9 +45675,9 @@
|
|||
"supports_tool_choice": true
|
||||
},
|
||||
"sambanova/DeepSeek-V3.1": {
|
||||
"max_tokens": 131072,
|
||||
"max_tokens": 7168,
|
||||
"max_input_tokens": 131072,
|
||||
"max_output_tokens": 131072,
|
||||
"max_output_tokens": 7168,
|
||||
"input_cost_per_token": 3e-06,
|
||||
"output_cost_per_token": 4.5e-06,
|
||||
"litellm_provider": "sambanova",
|
||||
|
|
@ -45714,9 +45701,9 @@
|
|||
"source": "https://cloud.sambanova.ai/plans/pricing"
|
||||
},
|
||||
"sambanova/DeepSeek-V3.2": {
|
||||
"max_tokens": 32768,
|
||||
"max_tokens": 7168,
|
||||
"max_input_tokens": 32768,
|
||||
"max_output_tokens": 32768,
|
||||
"max_output_tokens": 7168,
|
||||
"input_cost_per_token": 3e-06,
|
||||
"output_cost_per_token": 4.5e-06,
|
||||
"litellm_provider": "sambanova",
|
||||
|
|
|
|||
|
|
@ -23,3 +23,42 @@ def test_sambanova_minimax_m27_model_info():
|
|||
routed_model, provider, _, _ = get_llm_provider(model=model)
|
||||
assert routed_model == "MiniMax-M2.7"
|
||||
assert provider == "sambanova"
|
||||
|
||||
|
||||
def _sambanova_models() -> dict:
|
||||
json_path = Path(__file__).parents[2] / "model_prices_and_context_window.json"
|
||||
with open(json_path) as f:
|
||||
model_cost = json.load(f)
|
||||
return {k: v for k, v in model_cost.items() if k.startswith("sambanova/")}
|
||||
|
||||
|
||||
def test_sambanova_minimax_m3_model_info():
|
||||
info = _sambanova_models().get("sambanova/MiniMax-M3")
|
||||
assert info is not None, "sambanova/MiniMax-M3 missing from model_prices_and_context_window.json"
|
||||
assert info["litellm_provider"] == "sambanova"
|
||||
assert info["mode"] == "chat"
|
||||
assert info["max_input_tokens"] == 1048576
|
||||
assert info["input_cost_per_token"] == 6e-07
|
||||
assert info["output_cost_per_token"] == 2.4e-06
|
||||
assert info["supports_function_calling"] is True
|
||||
assert info["supports_tool_choice"] is True
|
||||
assert info["supports_reasoning"] is True
|
||||
assert info["supports_response_schema"] is True
|
||||
assert not info.get("supports_vision")
|
||||
|
||||
routed_model, provider, _, _ = get_llm_provider(model="sambanova/MiniMax-M3")
|
||||
assert routed_model == "MiniMax-M3"
|
||||
assert provider == "sambanova"
|
||||
|
||||
|
||||
def test_sambanova_max_output_tokens_match_live_catalog():
|
||||
models = _sambanova_models()
|
||||
assert models["sambanova/DeepSeek-V3.1"]["max_output_tokens"] == 7168
|
||||
assert models["sambanova/DeepSeek-V3.2"]["max_output_tokens"] == 7168
|
||||
assert models["sambanova/Meta-Llama-3.3-70B-Instruct"]["max_output_tokens"] == 3072
|
||||
|
||||
|
||||
def test_sambanova_retired_models_removed():
|
||||
models = _sambanova_models()
|
||||
assert "sambanova/DeepSeek-R1" not in models
|
||||
assert "sambanova/Llama-4-Maverick-17B-128E-Instruct" not in models
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue