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
feat(model_prices): add DeepSeek V4.1 Flash on Fireworks
mateo6cffb31e5cda
diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.jsonindex aadd9bd3028..7fa09951eae 100644--- a/litellm/model_prices_and_context_window_backup.json+++ b/litellm/model_prices_and_context_window_backup.json@@ -57695,6 +57695,23 @@"supports_tool_choice": true,"supports_vision": false},+ "fireworks_ai/accounts/fireworks/models/deepseek-v4p1-flash": {+ "cache_read_input_token_cost": 7e-09,+ "input_cost_per_token": 2.2e-07,+ "litellm_provider": "fireworks_ai",+ "max_input_tokens": 1048576,+ "max_output_tokens": 393216,+ "max_tokens": 393216,+ "mode": "chat",+ "output_cost_per_token": 6.6e-07,+ "source": "https://fireworks.ai/models/deepseek-ai/deepseek-v4p1-flash",+ "supports_function_calling": true,+ "supports_prompt_caching": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_tool_choice": true,+ "supports_vision": true+ },"fireworks_ai/accounts/fireworks/models/deepseek-v4-flash-vision-exp": {"cache_read_input_token_cost": 7e-09,"input_cost_per_token": 2.2e-07,@@ -57745,6 +57762,23 @@"supports_tool_choice": true,"supports_vision": false},+ "fireworks_ai/deepseek-v4p1-flash": {+ "cache_read_input_token_cost": 7e-09,+ "input_cost_per_token": 2.2e-07,+ "litellm_provider": "fireworks_ai",+ "max_input_tokens": 1048576,+ "max_output_tokens": 393216,+ "max_tokens": 393216,+ "mode": "chat",+ "output_cost_per_token": 6.6e-07,+ "source": "https://fireworks.ai/models/deepseek-ai/deepseek-v4p1-flash",+ "supports_function_calling": true,+ "supports_prompt_caching": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_tool_choice": true,+ "supports_vision": true+ },"fireworks_ai/deepseek-v4-flash-vision-exp": {"cache_read_input_token_cost": 7e-09,"input_cost_per_token": 2.2e-07,diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.jsonindex aadd9bd3028..7fa09951eae 100644--- a/model_prices_and_context_window.json+++ b/model_prices_and_context_window.json@@ -57695,6 +57695,23 @@"supports_tool_choice": true,"supports_vision": false},+ "fireworks_ai/accounts/fireworks/models/deepseek-v4p1-flash": {+ "cache_read_input_token_cost": 7e-09,+ "input_cost_per_token": 2.2e-07,+ "litellm_provider": "fireworks_ai",+ "max_input_tokens": 1048576,+ "max_output_tokens": 393216,+ "max_tokens": 393216,+ "mode": "chat",+ "output_cost_per_token": 6.6e-07,+ "source": "https://fireworks.ai/models/deepseek-ai/deepseek-v4p1-flash",+ "supports_function_calling": true,+ "supports_prompt_caching": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_tool_choice": true,+ "supports_vision": true+ },"fireworks_ai/accounts/fireworks/models/deepseek-v4-flash-vision-exp": {"cache_read_input_token_cost": 7e-09,"input_cost_per_token": 2.2e-07,@@ -57745,6 +57762,23 @@"supports_tool_choice": true,"supports_vision": false},+ "fireworks_ai/deepseek-v4p1-flash": {+ "cache_read_input_token_cost": 7e-09,+ "input_cost_per_token": 2.2e-07,+ "litellm_provider": "fireworks_ai",+ "max_input_tokens": 1048576,+ "max_output_tokens": 393216,+ "max_tokens": 393216,+ "mode": "chat",+ "output_cost_per_token": 6.6e-07,+ "source": "https://fireworks.ai/models/deepseek-ai/deepseek-v4p1-flash",+ "supports_function_calling": true,+ "supports_prompt_caching": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_tool_choice": true,+ "supports_vision": true+ },"fireworks_ai/deepseek-v4-flash-vision-exp": {"cache_read_input_token_cost": 7e-09,"input_cost_per_token": 2.2e-07,diff --git a/tests/test_litellm/test_fireworks_serverless_model_costs.py b/tests/test_litellm/test_fireworks_serverless_model_costs.pyindex 701938f5677..b8d36b996df 100644--- a/tests/test_litellm/test_fireworks_serverless_model_costs.py+++ b/tests/test_litellm/test_fireworks_serverless_model_costs.py@@ -62,11 +62,18 @@ TWIN_PINNED_PRICES = {"cache_read_input_token_cost": 7e-09,"output_cost_per_token": 6.6e-07,},+ "deepseek-v4p1-flash": {+ "input_cost_per_token": 2.2e-07,+ "cache_read_input_token_cost": 7e-09,+ "output_cost_per_token": 6.6e-07,+ "supports_vision": True,+ "max_output_tokens": 393216,+ },}-def test_deepseek_v4_flash_0731_twins_pin_published_pricing(model_data):- """Both 0731 entries carry the price published at docs.fireworks.ai/serverless/pricing."""+def test_deepseek_v4_flash_twins_pin_published_pricing(model_data):+ """Both entries of each Flash twin pair carry the price published at docs.fireworks.ai/serverless/pricing."""for bare_suffix, expected in TWIN_PINNED_PRICES.items():for key in (f"fireworks_ai/{bare_suffix}",