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
test(model_prices): cover Fireworks DeepSeek V4.1 costs
mateo115535c3add1
diff --git a/tests/test_litellm/test_fireworks_serverless_model_costs.py b/tests/test_litellm/test_fireworks_serverless_model_costs.pyindex b8d36b996df..e3404e477b7 100644--- a/tests/test_litellm/test_fireworks_serverless_model_costs.py+++ b/tests/test_litellm/test_fireworks_serverless_model_costs.py@@ -14,6 +14,8 @@ import osimport pytest+from litellm import completion_cost+from litellm.types.utils import Choices, Message, ModelResponse, Usagefrom litellm.utils import get_model_info@@ -56,6 +58,20 @@ def test_bare_fireworks_ids_resolve_through_prefixed_entries():assert info["max_output_tokens"] == expected["max_output_tokens"]+def test_deepseek_v4p1_flash_twin_costs():+ for model in (+ "fireworks_ai/deepseek-v4p1-flash",+ "fireworks_ai/accounts/fireworks/models/deepseek-v4p1-flash",+ ):+ response = ModelResponse(+ model=model,+ choices=[Choices(index=0, message=Message(role="assistant", content="ok"))],+ usage=Usage(prompt_tokens=1000, completion_tokens=1000, total_tokens=2000),+ )+ cost = completion_cost(completion_response=response, model=model)+ assert cost == pytest.approx(8.8e-04)++TWIN_PINNED_PRICES = {"deepseek-v4-flash-0731": {"input_cost_per_token": 2.2e-07,