fix(model_prices): add deepseek-flash and gpt-live-1, bill DeepSeek legacy flash aliases at Flash rates

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
mateo 2026-09-10 19:13:49 +00:00
parent 6c69dd0f72
commit 60c7dd8348
3 changed files with 146 additions and 39 deletions

View file

@ -56459,17 +56459,43 @@
"supports_reasoning": true,
"source": "https://serverless.tensormesh.ai/v1/models/openrouter"
},
"deepseek-v4-flash": {
"deepseek-flash": {
"cache_creation_input_token_cost": 0.0,
"cache_read_input_token_cost": 1.4e-08,
"input_cost_per_token": 4.4e-07,
"input_cost_per_token_cache_hit": 1.4e-08,
"cache_read_input_token_cost": 6e-09,
"input_cost_per_token": 3e-07,
"input_cost_per_token_cache_hit": 6e-09,
"litellm_provider": "deepseek",
"max_input_tokens": 1000000,
"max_output_tokens": 393216,
"max_tokens": 393216,
"mode": "chat",
"output_cost_per_token": 1.32e-06,
"output_cost_per_token": 1.2e-06,
"source": "https://api-docs.deepseek.com/quick_start/pricing",
"supported_endpoints": [
"/v1/chat/completions"
],
"supports_assistant_prefill": true,
"supports_function_calling": true,
"supports_native_streaming": true,
"supports_parallel_function_calling": true,
"supports_prompt_caching": true,
"supports_reasoning": true,
"supports_response_schema": true,
"supports_system_messages": true,
"supports_tool_choice": true,
"supports_vision": true
},
"deepseek-v4-flash": {
"cache_creation_input_token_cost": 0.0,
"cache_read_input_token_cost": 6e-09,
"input_cost_per_token": 3e-07,
"input_cost_per_token_cache_hit": 6e-09,
"litellm_provider": "deepseek",
"max_input_tokens": 1000000,
"max_output_tokens": 393216,
"max_tokens": 393216,
"mode": "chat",
"output_cost_per_token": 1.2e-06,
"source": "https://api-docs.deepseek.com/quick_start/pricing",
"supported_endpoints": [
"/v1/chat/completions"
@ -56487,15 +56513,15 @@
},
"deepseek-v4-flash-vision-exp": {
"cache_creation_input_token_cost": 0.0,
"cache_read_input_token_cost": 1.4e-08,
"input_cost_per_token": 4.4e-07,
"input_cost_per_token_cache_hit": 1.4e-08,
"cache_read_input_token_cost": 6e-09,
"input_cost_per_token": 3e-07,
"input_cost_per_token_cache_hit": 6e-09,
"litellm_provider": "deepseek",
"max_input_tokens": 1000000,
"max_output_tokens": 393216,
"max_tokens": 393216,
"mode": "chat",
"output_cost_per_token": 1.32e-06,
"output_cost_per_token": 1.2e-06,
"source": "https://api-docs.deepseek.com/quick_start/pricing",
"supported_endpoints": [
"/v1/chat/completions"
@ -56539,15 +56565,15 @@
},
"deepseek/deepseek-v4-flash": {
"cache_creation_input_token_cost": 0.0,
"cache_read_input_token_cost": 1.4e-08,
"input_cost_per_token": 4.4e-07,
"input_cost_per_token_cache_hit": 1.4e-08,
"cache_read_input_token_cost": 6e-09,
"input_cost_per_token": 3e-07,
"input_cost_per_token_cache_hit": 6e-09,
"litellm_provider": "deepseek",
"max_input_tokens": 1000000,
"max_output_tokens": 393216,
"max_tokens": 393216,
"mode": "chat",
"output_cost_per_token": 1.32e-06,
"output_cost_per_token": 1.2e-06,
"source": "https://api-docs.deepseek.com/quick_start/pricing",
"supported_endpoints": [
"/v1/chat/completions"
@ -56565,15 +56591,15 @@
},
"deepseek/deepseek-v4-flash-vision-exp": {
"cache_creation_input_token_cost": 0.0,
"cache_read_input_token_cost": 1.4e-08,
"input_cost_per_token": 4.4e-07,
"input_cost_per_token_cache_hit": 1.4e-08,
"cache_read_input_token_cost": 6e-09,
"input_cost_per_token": 3e-07,
"input_cost_per_token_cache_hit": 6e-09,
"litellm_provider": "deepseek",
"max_input_tokens": 1000000,
"max_output_tokens": 393216,
"max_tokens": 393216,
"mode": "chat",
"output_cost_per_token": 1.32e-06,
"output_cost_per_token": 1.2e-06,
"source": "https://api-docs.deepseek.com/quick_start/pricing",
"supported_endpoints": [
"/v1/chat/completions"
@ -56929,6 +56955,23 @@
],
"supports_audio_input": true
},
"gpt-live-1": {
"input_cost_per_second": 0.0008333333333333334,
"litellm_provider": "openai",
"mode": "realtime",
"source": "https://developers.openai.com/api/docs/models/gpt-live-1",
"supported_modalities": [
"text",
"audio"
],
"supported_output_modalities": [
"text",
"audio"
],
"supports_audio_input": true,
"supports_audio_output": true,
"supports_function_calling": true
},
"gpt-realtime-translate": {
"input_cost_per_second": 0.0005666666666666667,
"litellm_provider": "openai",

View file

@ -56459,17 +56459,43 @@
"supports_reasoning": true,
"source": "https://serverless.tensormesh.ai/v1/models/openrouter"
},
"deepseek-v4-flash": {
"deepseek-flash": {
"cache_creation_input_token_cost": 0.0,
"cache_read_input_token_cost": 1.4e-08,
"input_cost_per_token": 4.4e-07,
"input_cost_per_token_cache_hit": 1.4e-08,
"cache_read_input_token_cost": 6e-09,
"input_cost_per_token": 3e-07,
"input_cost_per_token_cache_hit": 6e-09,
"litellm_provider": "deepseek",
"max_input_tokens": 1000000,
"max_output_tokens": 393216,
"max_tokens": 393216,
"mode": "chat",
"output_cost_per_token": 1.32e-06,
"output_cost_per_token": 1.2e-06,
"source": "https://api-docs.deepseek.com/quick_start/pricing",
"supported_endpoints": [
"/v1/chat/completions"
],
"supports_assistant_prefill": true,
"supports_function_calling": true,
"supports_native_streaming": true,
"supports_parallel_function_calling": true,
"supports_prompt_caching": true,
"supports_reasoning": true,
"supports_response_schema": true,
"supports_system_messages": true,
"supports_tool_choice": true,
"supports_vision": true
},
"deepseek-v4-flash": {
"cache_creation_input_token_cost": 0.0,
"cache_read_input_token_cost": 6e-09,
"input_cost_per_token": 3e-07,
"input_cost_per_token_cache_hit": 6e-09,
"litellm_provider": "deepseek",
"max_input_tokens": 1000000,
"max_output_tokens": 393216,
"max_tokens": 393216,
"mode": "chat",
"output_cost_per_token": 1.2e-06,
"source": "https://api-docs.deepseek.com/quick_start/pricing",
"supported_endpoints": [
"/v1/chat/completions"
@ -56487,15 +56513,15 @@
},
"deepseek-v4-flash-vision-exp": {
"cache_creation_input_token_cost": 0.0,
"cache_read_input_token_cost": 1.4e-08,
"input_cost_per_token": 4.4e-07,
"input_cost_per_token_cache_hit": 1.4e-08,
"cache_read_input_token_cost": 6e-09,
"input_cost_per_token": 3e-07,
"input_cost_per_token_cache_hit": 6e-09,
"litellm_provider": "deepseek",
"max_input_tokens": 1000000,
"max_output_tokens": 393216,
"max_tokens": 393216,
"mode": "chat",
"output_cost_per_token": 1.32e-06,
"output_cost_per_token": 1.2e-06,
"source": "https://api-docs.deepseek.com/quick_start/pricing",
"supported_endpoints": [
"/v1/chat/completions"
@ -56539,15 +56565,15 @@
},
"deepseek/deepseek-v4-flash": {
"cache_creation_input_token_cost": 0.0,
"cache_read_input_token_cost": 1.4e-08,
"input_cost_per_token": 4.4e-07,
"input_cost_per_token_cache_hit": 1.4e-08,
"cache_read_input_token_cost": 6e-09,
"input_cost_per_token": 3e-07,
"input_cost_per_token_cache_hit": 6e-09,
"litellm_provider": "deepseek",
"max_input_tokens": 1000000,
"max_output_tokens": 393216,
"max_tokens": 393216,
"mode": "chat",
"output_cost_per_token": 1.32e-06,
"output_cost_per_token": 1.2e-06,
"source": "https://api-docs.deepseek.com/quick_start/pricing",
"supported_endpoints": [
"/v1/chat/completions"
@ -56565,15 +56591,15 @@
},
"deepseek/deepseek-v4-flash-vision-exp": {
"cache_creation_input_token_cost": 0.0,
"cache_read_input_token_cost": 1.4e-08,
"input_cost_per_token": 4.4e-07,
"input_cost_per_token_cache_hit": 1.4e-08,
"cache_read_input_token_cost": 6e-09,
"input_cost_per_token": 3e-07,
"input_cost_per_token_cache_hit": 6e-09,
"litellm_provider": "deepseek",
"max_input_tokens": 1000000,
"max_output_tokens": 393216,
"max_tokens": 393216,
"mode": "chat",
"output_cost_per_token": 1.32e-06,
"output_cost_per_token": 1.2e-06,
"source": "https://api-docs.deepseek.com/quick_start/pricing",
"supported_endpoints": [
"/v1/chat/completions"
@ -56929,6 +56955,23 @@
],
"supports_audio_input": true
},
"gpt-live-1": {
"input_cost_per_second": 0.0008333333333333334,
"litellm_provider": "openai",
"mode": "realtime",
"source": "https://developers.openai.com/api/docs/models/gpt-live-1",
"supported_modalities": [
"text",
"audio"
],
"supported_output_modalities": [
"text",
"audio"
],
"supports_audio_input": true,
"supports_audio_output": true,
"supports_function_calling": true
},
"gpt-realtime-translate": {
"input_cost_per_second": 0.0005666666666666667,
"litellm_provider": "openai",

View file

@ -4071,7 +4071,7 @@ def test_deepseek_v4_models_in_cost_map():
configured in model_prices_and_context_window.json.
Prices sourced from https://api-docs.deepseek.com/quick_start/pricing:
- deepseek-v4-flash: $0.44/M input, $1.32/M output
- deepseek-v4-flash: $0.30/M input, $1.20/M output
- deepseek-v4-pro: $1.32/M input, $3.96/M output
Closes https://github.com/BerriAI/litellm/issues/26709
@ -4085,7 +4085,7 @@ def test_deepseek_v4_models_in_cost_map():
# --- bare model names ---
for key, expected_input, expected_output, expected_cache in [
("deepseek-v4-flash", 4.4e-07, 1.32e-06, 1.4e-08),
("deepseek-v4-flash", 3e-07, 1.2e-06, 6e-09),
("deepseek-v4-pro", 1.32e-06, 3.96e-06, 4.4e-08),
]:
info = model_cost.get(key)
@ -4101,7 +4101,7 @@ def test_deepseek_v4_models_in_cost_map():
# --- provider-prefixed names ---
for key, expected_input, expected_output, expected_cache in [
("deepseek/deepseek-v4-flash", 4.4e-07, 1.32e-06, 1.4e-08),
("deepseek/deepseek-v4-flash", 3e-07, 1.2e-06, 6e-09),
("deepseek/deepseek-v4-pro", 1.32e-06, 3.96e-06, 4.4e-08),
]:
info = model_cost.get(key)
@ -4129,7 +4129,7 @@ def test_deepseek_v4_models_in_backup_cost_map():
# --- bare model names ---
for key, expected_input, expected_output, expected_cache in [
("deepseek-v4-flash", 4.4e-07, 1.32e-06, 1.4e-08),
("deepseek-v4-flash", 3e-07, 1.2e-06, 6e-09),
("deepseek-v4-pro", 1.32e-06, 3.96e-06, 4.4e-08),
]:
info = model_cost.get(key)
@ -4143,7 +4143,7 @@ def test_deepseek_v4_models_in_backup_cost_map():
# --- provider-prefixed names ---
for key, expected_input, expected_output, expected_cache in [
("deepseek/deepseek-v4-flash", 4.4e-07, 1.32e-06, 1.4e-08),
("deepseek/deepseek-v4-flash", 3e-07, 1.2e-06, 6e-09),
("deepseek/deepseek-v4-pro", 1.32e-06, 3.96e-06, 4.4e-08),
]:
info = model_cost.get(key)
@ -4155,6 +4155,27 @@ def test_deepseek_v4_models_in_backup_cost_map():
assert info["cache_read_input_token_cost"] == expected_cache
def test_deepseek_flash_completion_cost():
from litellm.types.utils import ModelResponse
response = ModelResponse(
model="deepseek-flash",
usage=Usage(
prompt_tokens=1_000_000,
completion_tokens=1_000_000,
total_tokens=2_000_000,
),
)
cost = litellm.completion_cost(
completion_response=response,
model="deepseek-flash",
custom_llm_provider="deepseek",
)
assert cost == pytest.approx(1.50, abs=1e-9)
_FIREWORKS_MODELS = [
(
"accounts/fireworks/models/glm-5p2",