Skip to content

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]

feat(dashscope): add qwen3.7-plus and qwen3.7-max to the model cost map (#35123)

devin-ai-integration[bot]551e5d097c11
diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.json
index 2cef600ea32..87d9b6afc18 100644
--- a/litellm/model_prices_and_context_window_backup.json
+++ b/litellm/model_prices_and_context_window_backup.json
@@ -13567,6 +13567,56 @@
}
]
},
+ "dashscope/qwen3.7-max": {
+ "cache_read_input_token_cost": 5e-07,
+ "input_cost_per_token": 2.5e-06,
+ "litellm_provider": "dashscope",
+ "max_input_tokens": 991808,
+ "max_output_tokens": 65536,
+ "max_tokens": 65536,
+ "mode": "chat",
+ "output_cost_per_token": 7.5e-06,
+ "source": "https://www.alibabacloud.com/help/en/model-studio/models",
+ "supports_function_calling": true,
+ "supports_prompt_caching": true,
+ "supports_reasoning": true,
+ "supports_response_schema": true,
+ "supports_tool_choice": true
+ },
+ "dashscope/qwen3.7-plus": {
+ "litellm_provider": "dashscope",
+ "max_input_tokens": 991808,
+ "max_output_tokens": 65536,
+ "max_tokens": 65536,
+ "mode": "chat",
+ "source": "https://www.alibabacloud.com/help/en/model-studio/models",
+ "supports_function_calling": true,
+ "supports_prompt_caching": true,
+ "supports_reasoning": true,
+ "supports_response_schema": true,
+ "supports_tool_choice": true,
+ "supports_vision": true,
+ "tiered_pricing": [
+ {
+ "cache_read_input_token_cost": 8e-08,
+ "input_cost_per_token": 4e-07,
+ "output_cost_per_token": 1.6e-06,
+ "range": [
+ 0,
+ 256000.0
+ ]
+ },
+ {
+ "cache_read_input_token_cost": 2.4e-07,
+ "input_cost_per_token": 1.2e-06,
+ "output_cost_per_token": 4.8e-06,
+ "range": [
+ 256000.0,
+ 1000000.0
+ ]
+ }
+ ]
+ },
"dashscope/qwq-plus": {
"input_cost_per_token": 8e-07,
"litellm_provider": "dashscope",
diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.json
index db28118d52b..0edd3bd5f30 100644
--- a/model_prices_and_context_window.json
+++ b/model_prices_and_context_window.json
@@ -13567,6 +13567,56 @@
}
]
},
+ "dashscope/qwen3.7-max": {
+ "cache_read_input_token_cost": 5e-07,
+ "input_cost_per_token": 2.5e-06,
+ "litellm_provider": "dashscope",
+ "max_input_tokens": 991808,
+ "max_output_tokens": 65536,
+ "max_tokens": 65536,
+ "mode": "chat",
+ "output_cost_per_token": 7.5e-06,
+ "source": "https://www.alibabacloud.com/help/en/model-studio/models",
+ "supports_function_calling": true,
+ "supports_prompt_caching": true,
+ "supports_reasoning": true,
+ "supports_response_schema": true,
+ "supports_tool_choice": true
+ },
+ "dashscope/qwen3.7-plus": {
+ "litellm_provider": "dashscope",
+ "max_input_tokens": 991808,
+ "max_output_tokens": 65536,
+ "max_tokens": 65536,
+ "mode": "chat",
+ "source": "https://www.alibabacloud.com/help/en/model-studio/models",
+ "supports_function_calling": true,
+ "supports_prompt_caching": true,
+ "supports_reasoning": true,
+ "supports_response_schema": true,
+ "supports_tool_choice": true,
+ "supports_vision": true,
+ "tiered_pricing": [
+ {
+ "cache_read_input_token_cost": 8e-08,
+ "input_cost_per_token": 4e-07,
+ "output_cost_per_token": 1.6e-06,
+ "range": [
+ 0,
+ 256000.0
+ ]
+ },
+ {
+ "cache_read_input_token_cost": 2.4e-07,
+ "input_cost_per_token": 1.2e-06,
+ "output_cost_per_token": 4.8e-06,
+ "range": [
+ 256000.0,
+ 1000000.0
+ ]
+ }
+ ]
+ },
"dashscope/qwq-plus": {
"input_cost_per_token": 8e-07,
"litellm_provider": "dashscope",
diff --git a/tests/test_litellm/test_cost_calculator.py b/tests/test_litellm/test_cost_calculator.py
index 276ee96ed65..e6ae1f85cfd 100644
--- a/tests/test_litellm/test_cost_calculator.py
+++ b/tests/test_litellm/test_cost_calculator.py
@@ -1014,9 +1014,9 @@ def test_tiered_pricing_only_deployment_selects_router_model_id():
router = Router(
model_list=[
{
- "model_name": "qwen-3.7-plus",
+ "model_name": "qwen-tier-only",
"litellm_params": {
- "model": "dashscope/qwen3.7-plus",
+ "model": "dashscope/qwen-tier-only-test",
"api_key": "sk-fake",
},
"model_info": {
@@ -1037,10 +1037,12 @@ def test_tiered_pricing_only_deployment_selects_router_model_id():
assert entry.get("input_cost_per_token") is None
assert entry.get("tiered_pricing") is not None
# The stripped shared alias must not carry tiered pricing.
- assert litellm.model_cost["dashscope/qwen3.7-plus"].get("tiered_pricing") is None
+ assert (
+ litellm.model_cost["dashscope/qwen-tier-only-test"].get("tiered_pricing") is None
+ )
selected = _select_model_name_for_cost_calc(
- model="dashscope/qwen3.7-plus",
+ model="dashscope/qwen-tier-only-test",
completion_response=None,
custom_pricing=True,
custom_llm_provider="dashscope",