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
fix(fireworks_ai): correct glm-5p2 prompt-cache read price to $0.14/1M
Tin Chi Lod9661222492a
diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.jsonindex ee996198b28..e5afc81b641 100644--- a/litellm/model_prices_and_context_window_backup.json+++ b/litellm/model_prices_and_context_window_backup.json@@ -16272,7 +16272,7 @@"supports_vision": false},"fireworks_ai/accounts/fireworks/models/glm-5p2": {- "cache_read_input_token_cost": 2.6e-07,+ "cache_read_input_token_cost": 1.4e-07,"input_cost_per_token": 1.4e-06,"litellm_provider": "fireworks_ai","max_input_tokens": 1048576,@@ -16686,7 +16686,7 @@"supports_vision": false},"fireworks_ai/glm-5p2": {- "cache_read_input_token_cost": 2.6e-07,+ "cache_read_input_token_cost": 1.4e-07,"input_cost_per_token": 1.4e-06,"litellm_provider": "fireworks_ai","max_input_tokens": 1048576,diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.jsonindex b1a87c444c8..5cf99ba8bac 100644--- a/model_prices_and_context_window.json+++ b/model_prices_and_context_window.json@@ -16272,7 +16272,7 @@"supports_vision": false},"fireworks_ai/accounts/fireworks/models/glm-5p2": {- "cache_read_input_token_cost": 2.6e-07,+ "cache_read_input_token_cost": 1.4e-07,"input_cost_per_token": 1.4e-06,"litellm_provider": "fireworks_ai","max_input_tokens": 1048576,@@ -16686,7 +16686,7 @@"supports_vision": false},"fireworks_ai/glm-5p2": {- "cache_read_input_token_cost": 2.6e-07,+ "cache_read_input_token_cost": 1.4e-07,"input_cost_per_token": 1.4e-06,"litellm_provider": "fireworks_ai","max_input_tokens": 1048576,diff --git a/tests/test_litellm/llms/fireworks_ai/test_fireworks_ai_cost_calculator.py b/tests/test_litellm/llms/fireworks_ai/test_fireworks_ai_cost_calculator.pyindex 99dcaa36c75..3297750fa6e 100644--- a/tests/test_litellm/llms/fireworks_ai/test_fireworks_ai_cost_calculator.py+++ b/tests/test_litellm/llms/fireworks_ai/test_fireworks_ai_cost_calculator.py@@ -5,12 +5,15 @@ import pytestsys.path.insert(0, os.path.abspath("../../../../.."))+import litellmfrom litellm.llms.fireworks_ai.cost_calculator import cost_per_tokenfrom litellm.types.utils import PromptTokensDetailsWrapper, UsageMODEL = "accounts/fireworks/models/glm-5p2"INPUT_COST = 1.4e-06-CACHE_READ_COST = 2.6e-07+# Read the cached rate from the price map so this test tracks the shipped value+# (glm-5p2 is $0.14/1M) instead of hardcoding a number that breaks when it changes.+CACHE_READ_COST = litellm.get_model_info(model=MODEL, custom_llm_provider="fireworks_ai")["cache_read_input_token_cost"]OUTPUT_COST = 4.4e-06diff --git a/tests/test_litellm/test_utils.py b/tests/test_litellm/test_utils.pyindex edd93cbebe0..a1a9448cc58 100644--- a/tests/test_litellm/test_utils.py+++ b/tests/test_litellm/test_utils.py@@ -4317,7 +4317,7 @@ _FIREWORKS_MODELS = ["accounts/fireworks/models/glm-5p2",1.4e-06,4.4e-06,- 2.6e-07,+ 1.4e-07,1048576,131072,False,