mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-24 00:52:24 +00:00
fix(model_prices): add groq qwen3.6-27b deprecation date and bedrock qwen3-next regional pricing
Groq lists qwen/qwen3.6-27b for shutdown on 2026-09-14. Adds the six regional Bedrock qwen.qwen3-next-80b-a3b entries priced per AWS's published regional rates (absorbs #42191) with a regression test that the regional entry is used instead of the US rate Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
30adc1b2b9
commit
d9a97d74db
3 changed files with 185 additions and 0 deletions
|
|
@ -35294,6 +35294,7 @@
|
|||
"mode": "chat",
|
||||
"output_cost_per_token": 3e-06,
|
||||
"source": "https://console.groq.com/docs/model/qwen/qwen3.6-27b",
|
||||
"deprecation_date": "2026-09-14",
|
||||
"supports_function_calling": true,
|
||||
"supports_reasoning": true,
|
||||
"supports_response_schema": false,
|
||||
|
|
@ -44299,6 +44300,84 @@
|
|||
"supports_system_messages": true,
|
||||
"supports_native_structured_output": true
|
||||
},
|
||||
"bedrock/ap-northeast-1/qwen.qwen3-next-80b-a3b": {
|
||||
"input_cost_per_token": 1.8e-07,
|
||||
"litellm_provider": "bedrock",
|
||||
"max_input_tokens": 128000,
|
||||
"max_output_tokens": 8192,
|
||||
"max_tokens": 8192,
|
||||
"mode": "chat",
|
||||
"output_cost_per_token": 1.45e-06,
|
||||
"source": "https://aws.amazon.com/bedrock/pricing/",
|
||||
"supports_function_calling": true,
|
||||
"supports_native_structured_output": true,
|
||||
"supports_system_messages": true
|
||||
},
|
||||
"bedrock/ap-south-1/qwen.qwen3-next-80b-a3b": {
|
||||
"input_cost_per_token": 1.8e-07,
|
||||
"litellm_provider": "bedrock",
|
||||
"max_input_tokens": 128000,
|
||||
"max_output_tokens": 8192,
|
||||
"max_tokens": 8192,
|
||||
"mode": "chat",
|
||||
"output_cost_per_token": 1.41e-06,
|
||||
"source": "https://aws.amazon.com/bedrock/pricing/",
|
||||
"supports_function_calling": true,
|
||||
"supports_native_structured_output": true,
|
||||
"supports_system_messages": true
|
||||
},
|
||||
"bedrock/ap-southeast-2/qwen.qwen3-next-80b-a3b": {
|
||||
"input_cost_per_token": 1.545e-07,
|
||||
"litellm_provider": "bedrock",
|
||||
"max_input_tokens": 128000,
|
||||
"max_output_tokens": 8192,
|
||||
"max_tokens": 8192,
|
||||
"mode": "chat",
|
||||
"output_cost_per_token": 1.236e-06,
|
||||
"source": "https://aws.amazon.com/bedrock/pricing/",
|
||||
"supports_function_calling": true,
|
||||
"supports_native_structured_output": true,
|
||||
"supports_system_messages": true
|
||||
},
|
||||
"bedrock/eu-west-1/qwen.qwen3-next-80b-a3b": {
|
||||
"input_cost_per_token": 1.8e-07,
|
||||
"litellm_provider": "bedrock",
|
||||
"max_input_tokens": 128000,
|
||||
"max_output_tokens": 8192,
|
||||
"max_tokens": 8192,
|
||||
"mode": "chat",
|
||||
"output_cost_per_token": 1.41e-06,
|
||||
"source": "https://aws.amazon.com/bedrock/pricing/",
|
||||
"supports_function_calling": true,
|
||||
"supports_native_structured_output": true,
|
||||
"supports_system_messages": true
|
||||
},
|
||||
"bedrock/eu-west-2/qwen.qwen3-next-80b-a3b": {
|
||||
"input_cost_per_token": 2.3e-07,
|
||||
"litellm_provider": "bedrock",
|
||||
"max_input_tokens": 128000,
|
||||
"max_output_tokens": 8192,
|
||||
"max_tokens": 8192,
|
||||
"mode": "chat",
|
||||
"output_cost_per_token": 1.86e-06,
|
||||
"source": "https://aws.amazon.com/bedrock/pricing/",
|
||||
"supports_function_calling": true,
|
||||
"supports_native_structured_output": true,
|
||||
"supports_system_messages": true
|
||||
},
|
||||
"bedrock/sa-east-1/qwen.qwen3-next-80b-a3b": {
|
||||
"input_cost_per_token": 1.8e-07,
|
||||
"litellm_provider": "bedrock",
|
||||
"max_input_tokens": 128000,
|
||||
"max_output_tokens": 8192,
|
||||
"max_tokens": 8192,
|
||||
"mode": "chat",
|
||||
"output_cost_per_token": 1.45e-06,
|
||||
"source": "https://aws.amazon.com/bedrock/pricing/",
|
||||
"supports_function_calling": true,
|
||||
"supports_native_structured_output": true,
|
||||
"supports_system_messages": true
|
||||
},
|
||||
"qwen.qwen3-vl-235b-a22b": {
|
||||
"input_cost_per_token": 5.3e-07,
|
||||
"litellm_provider": "bedrock_converse",
|
||||
|
|
|
|||
|
|
@ -35294,6 +35294,7 @@
|
|||
"mode": "chat",
|
||||
"output_cost_per_token": 3e-06,
|
||||
"source": "https://console.groq.com/docs/model/qwen/qwen3.6-27b",
|
||||
"deprecation_date": "2026-09-14",
|
||||
"supports_function_calling": true,
|
||||
"supports_reasoning": true,
|
||||
"supports_response_schema": false,
|
||||
|
|
@ -44299,6 +44300,84 @@
|
|||
"supports_system_messages": true,
|
||||
"supports_native_structured_output": true
|
||||
},
|
||||
"bedrock/ap-northeast-1/qwen.qwen3-next-80b-a3b": {
|
||||
"input_cost_per_token": 1.8e-07,
|
||||
"litellm_provider": "bedrock",
|
||||
"max_input_tokens": 128000,
|
||||
"max_output_tokens": 8192,
|
||||
"max_tokens": 8192,
|
||||
"mode": "chat",
|
||||
"output_cost_per_token": 1.45e-06,
|
||||
"source": "https://aws.amazon.com/bedrock/pricing/",
|
||||
"supports_function_calling": true,
|
||||
"supports_native_structured_output": true,
|
||||
"supports_system_messages": true
|
||||
},
|
||||
"bedrock/ap-south-1/qwen.qwen3-next-80b-a3b": {
|
||||
"input_cost_per_token": 1.8e-07,
|
||||
"litellm_provider": "bedrock",
|
||||
"max_input_tokens": 128000,
|
||||
"max_output_tokens": 8192,
|
||||
"max_tokens": 8192,
|
||||
"mode": "chat",
|
||||
"output_cost_per_token": 1.41e-06,
|
||||
"source": "https://aws.amazon.com/bedrock/pricing/",
|
||||
"supports_function_calling": true,
|
||||
"supports_native_structured_output": true,
|
||||
"supports_system_messages": true
|
||||
},
|
||||
"bedrock/ap-southeast-2/qwen.qwen3-next-80b-a3b": {
|
||||
"input_cost_per_token": 1.545e-07,
|
||||
"litellm_provider": "bedrock",
|
||||
"max_input_tokens": 128000,
|
||||
"max_output_tokens": 8192,
|
||||
"max_tokens": 8192,
|
||||
"mode": "chat",
|
||||
"output_cost_per_token": 1.236e-06,
|
||||
"source": "https://aws.amazon.com/bedrock/pricing/",
|
||||
"supports_function_calling": true,
|
||||
"supports_native_structured_output": true,
|
||||
"supports_system_messages": true
|
||||
},
|
||||
"bedrock/eu-west-1/qwen.qwen3-next-80b-a3b": {
|
||||
"input_cost_per_token": 1.8e-07,
|
||||
"litellm_provider": "bedrock",
|
||||
"max_input_tokens": 128000,
|
||||
"max_output_tokens": 8192,
|
||||
"max_tokens": 8192,
|
||||
"mode": "chat",
|
||||
"output_cost_per_token": 1.41e-06,
|
||||
"source": "https://aws.amazon.com/bedrock/pricing/",
|
||||
"supports_function_calling": true,
|
||||
"supports_native_structured_output": true,
|
||||
"supports_system_messages": true
|
||||
},
|
||||
"bedrock/eu-west-2/qwen.qwen3-next-80b-a3b": {
|
||||
"input_cost_per_token": 2.3e-07,
|
||||
"litellm_provider": "bedrock",
|
||||
"max_input_tokens": 128000,
|
||||
"max_output_tokens": 8192,
|
||||
"max_tokens": 8192,
|
||||
"mode": "chat",
|
||||
"output_cost_per_token": 1.86e-06,
|
||||
"source": "https://aws.amazon.com/bedrock/pricing/",
|
||||
"supports_function_calling": true,
|
||||
"supports_native_structured_output": true,
|
||||
"supports_system_messages": true
|
||||
},
|
||||
"bedrock/sa-east-1/qwen.qwen3-next-80b-a3b": {
|
||||
"input_cost_per_token": 1.8e-07,
|
||||
"litellm_provider": "bedrock",
|
||||
"max_input_tokens": 128000,
|
||||
"max_output_tokens": 8192,
|
||||
"max_tokens": 8192,
|
||||
"mode": "chat",
|
||||
"output_cost_per_token": 1.45e-06,
|
||||
"source": "https://aws.amazon.com/bedrock/pricing/",
|
||||
"supports_function_calling": true,
|
||||
"supports_native_structured_output": true,
|
||||
"supports_system_messages": true
|
||||
},
|
||||
"qwen.qwen3-vl-235b-a22b": {
|
||||
"input_cost_per_token": 5.3e-07,
|
||||
"litellm_provider": "bedrock_converse",
|
||||
|
|
|
|||
|
|
@ -4230,3 +4230,30 @@ def test_completion_cost_prices_responses_websocket_turns_per_service_tier():
|
|||
assert ws_cost == pytest.approx(_http_cost(100, 40, "default") + _http_cost(60, 10, "priority"))
|
||||
assert ws_cost != pytest.approx(_http_cost(160, 50, "default"))
|
||||
assert ws_cost != pytest.approx(_http_cost(160, 50, "priority"))
|
||||
|
||||
|
||||
QWEN3_NEXT_REGIONS: Final = ("ap-northeast-1", "ap-south-1", "ap-southeast-2", "eu-west-1", "eu-west-2", "sa-east-1")
|
||||
|
||||
|
||||
@pytest.mark.parametrize("region", QWEN3_NEXT_REGIONS)
|
||||
def test_cost_per_token_bedrock_qwen3_next_uses_regional_entry_not_us_rate(
|
||||
monkeypatch: pytest.MonkeyPatch, region: str
|
||||
) -> None:
|
||||
monkeypatch.setenv("LITELLM_LOCAL_MODEL_COST_MAP", "True")
|
||||
monkeypatch.setattr(litellm, "model_cost", litellm.get_model_cost_map(url=""))
|
||||
|
||||
regional: Final = litellm.model_cost[f"bedrock/{region}/qwen.qwen3-next-80b-a3b"]
|
||||
us: Final = litellm.model_cost["qwen.qwen3-next-80b-a3b"]
|
||||
assert regional["input_cost_per_token"] != us["input_cost_per_token"]
|
||||
assert regional["output_cost_per_token"] != us["output_cost_per_token"]
|
||||
|
||||
prompt_tokens, completion_tokens = 1000, 500
|
||||
prompt_usd, completion_usd = cost_per_token(
|
||||
model=f"bedrock/{region}/qwen.qwen3-next-80b-a3b",
|
||||
prompt_tokens=prompt_tokens,
|
||||
completion_tokens=completion_tokens,
|
||||
custom_llm_provider="bedrock",
|
||||
)
|
||||
|
||||
assert prompt_usd == pytest.approx(prompt_tokens * regional["input_cost_per_token"])
|
||||
assert completion_usd == pytest.approx(completion_tokens * regional["output_cost_per_token"])
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue