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]

fix(model-pricing): add missing fireworks_ai model pricing for glm-4p7, minimax-m2p1, kimi-k2p5 (#21642)

michelligabrieled001fe9a1691
diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.json
index 8ed45ddd90c..034b80a58c8 100644
--- a/litellm/model_prices_and_context_window_backup.json
+++ b/litellm/model_prices_and_context_window_backup.json
@@ -12621,6 +12621,21 @@
"supports_response_schema": true,
"supports_tool_choice": true
},
+ "fireworks_ai/accounts/fireworks/models/glm-4p7": {
+ "cache_read_input_token_cost": 3e-07,
+ "input_cost_per_token": 6e-07,
+ "litellm_provider": "fireworks_ai",
+ "max_input_tokens": 202800,
+ "max_output_tokens": 202800,
+ "max_tokens": 202800,
+ "mode": "chat",
+ "output_cost_per_token": 2.2e-06,
+ "source": "https://fireworks.ai/models/fireworks/glm-4p7",
+ "supports_function_calling": true,
+ "supports_reasoning": true,
+ "supports_response_schema": true,
+ "supports_tool_choice": true
+ },
"fireworks_ai/accounts/fireworks/models/gpt-oss-120b": {
"input_cost_per_token": 1.5e-07,
"litellm_provider": "fireworks_ai",
@@ -12690,6 +12705,7 @@
"supports_web_search": true
},
"fireworks_ai/accounts/fireworks/models/kimi-k2p5": {
+ "cache_read_input_token_cost": 1e-07,
"input_cost_per_token": 6e-07,
"litellm_provider": "fireworks_ai",
"max_input_tokens": 262144,
@@ -12805,6 +12821,20 @@
"supports_response_schema": true,
"supports_tool_choice": false
},
+ "fireworks_ai/accounts/fireworks/models/minimax-m2p1": {
+ "cache_read_input_token_cost": 3e-08,
+ "input_cost_per_token": 3e-07,
+ "litellm_provider": "fireworks_ai",
+ "max_input_tokens": 204800,
+ "max_output_tokens": 204800,
+ "max_tokens": 204800,
+ "mode": "chat",
+ "output_cost_per_token": 1.2e-06,
+ "source": "https://fireworks.ai/models/fireworks/minimax-m2p1",
+ "supports_function_calling": true,
+ "supports_response_schema": true,
+ "supports_tool_choice": true
+ },
"fireworks_ai/accounts/fireworks/models/mixtral-8x22b-instruct-hf": {
"input_cost_per_token": 1.2e-06,
"litellm_provider": "fireworks_ai",
@@ -12857,6 +12887,49 @@
"supports_response_schema": true,
"supports_tool_choice": false
},
+ "fireworks_ai/glm-4p7": {
+ "cache_read_input_token_cost": 3e-07,
+ "input_cost_per_token": 6e-07,
+ "litellm_provider": "fireworks_ai",
+ "max_input_tokens": 202800,
+ "max_output_tokens": 202800,
+ "max_tokens": 202800,
+ "mode": "chat",
+ "output_cost_per_token": 2.2e-06,
+ "source": "https://fireworks.ai/models/fireworks/glm-4p7",
+ "supports_function_calling": true,
+ "supports_reasoning": true,
+ "supports_response_schema": true,
+ "supports_tool_choice": true
+ },
+ "fireworks_ai/kimi-k2p5": {
+ "cache_read_input_token_cost": 1e-07,
+ "input_cost_per_token": 6e-07,
+ "litellm_provider": "fireworks_ai",
+ "max_input_tokens": 262144,
+ "max_output_tokens": 262144,
+ "max_tokens": 262144,
+ "mode": "chat",
+ "output_cost_per_token": 3e-06,
+ "source": "https://fireworks.ai/pricing",
+ "supports_function_calling": true,
+ "supports_response_schema": true,
+ "supports_tool_choice": true
+ },
+ "fireworks_ai/minimax-m2p1": {
+ "cache_read_input_token_cost": 3e-08,
+ "input_cost_per_token": 3e-07,
+ "litellm_provider": "fireworks_ai",
+ "max_input_tokens": 204800,
+ "max_output_tokens": 204800,
+ "max_tokens": 204800,
+ "mode": "chat",
+ "output_cost_per_token": 1.2e-06,
+ "source": "https://fireworks.ai/models/fireworks/minimax-m2p1",
+ "supports_function_calling": true,
+ "supports_response_schema": true,
+ "supports_tool_choice": true
+ },
"fireworks_ai/nomic-ai/nomic-embed-text-v1": {
"input_cost_per_token": 8e-09,
"litellm_provider": "fireworks_ai-embedding-models",
diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.json
index 8ed45ddd90c..034b80a58c8 100644
--- a/model_prices_and_context_window.json
+++ b/model_prices_and_context_window.json
@@ -12621,6 +12621,21 @@
"supports_response_schema": true,
"supports_tool_choice": true
},
+ "fireworks_ai/accounts/fireworks/models/glm-4p7": {
+ "cache_read_input_token_cost": 3e-07,
+ "input_cost_per_token": 6e-07,
+ "litellm_provider": "fireworks_ai",
+ "max_input_tokens": 202800,
+ "max_output_tokens": 202800,
+ "max_tokens": 202800,
+ "mode": "chat",
+ "output_cost_per_token": 2.2e-06,
+ "source": "https://fireworks.ai/models/fireworks/glm-4p7",
+ "supports_function_calling": true,
+ "supports_reasoning": true,
+ "supports_response_schema": true,
+ "supports_tool_choice": true
+ },
"fireworks_ai/accounts/fireworks/models/gpt-oss-120b": {
"input_cost_per_token": 1.5e-07,
"litellm_provider": "fireworks_ai",
@@ -12690,6 +12705,7 @@
"supports_web_search": true
},
"fireworks_ai/accounts/fireworks/models/kimi-k2p5": {
+ "cache_read_input_token_cost": 1e-07,
"input_cost_per_token": 6e-07,
"litellm_provider": "fireworks_ai",
"max_input_tokens": 262144,
@@ -12805,6 +12821,20 @@
"supports_response_schema": true,
"supports_tool_choice": false
},
+ "fireworks_ai/accounts/fireworks/models/minimax-m2p1": {
+ "cache_read_input_token_cost": 3e-08,
+ "input_cost_per_token": 3e-07,
+ "litellm_provider": "fireworks_ai",
+ "max_input_tokens": 204800,
+ "max_output_tokens": 204800,
+ "max_tokens": 204800,
+ "mode": "chat",
+ "output_cost_per_token": 1.2e-06,
+ "source": "https://fireworks.ai/models/fireworks/minimax-m2p1",
+ "supports_function_calling": true,
+ "supports_response_schema": true,
+ "supports_tool_choice": true
+ },
"fireworks_ai/accounts/fireworks/models/mixtral-8x22b-instruct-hf": {
"input_cost_per_token": 1.2e-06,
"litellm_provider": "fireworks_ai",
@@ -12857,6 +12887,49 @@
"supports_response_schema": true,
"supports_tool_choice": false
},
+ "fireworks_ai/glm-4p7": {
+ "cache_read_input_token_cost": 3e-07,
+ "input_cost_per_token": 6e-07,
+ "litellm_provider": "fireworks_ai",
+ "max_input_tokens": 202800,
+ "max_output_tokens": 202800,
+ "max_tokens": 202800,
+ "mode": "chat",
+ "output_cost_per_token": 2.2e-06,
+ "source": "https://fireworks.ai/models/fireworks/glm-4p7",
+ "supports_function_calling": true,
+ "supports_reasoning": true,
+ "supports_response_schema": true,
+ "supports_tool_choice": true
+ },
+ "fireworks_ai/kimi-k2p5": {
+ "cache_read_input_token_cost": 1e-07,
+ "input_cost_per_token": 6e-07,
+ "litellm_provider": "fireworks_ai",
+ "max_input_tokens": 262144,
+ "max_output_tokens": 262144,
+ "max_tokens": 262144,
+ "mode": "chat",
+ "output_cost_per_token": 3e-06,
+ "source": "https://fireworks.ai/pricing",
+ "supports_function_calling": true,
+ "supports_response_schema": true,
+ "supports_tool_choice": true
+ },
+ "fireworks_ai/minimax-m2p1": {
+ "cache_read_input_token_cost": 3e-08,
+ "input_cost_per_token": 3e-07,
+ "litellm_provider": "fireworks_ai",
+ "max_input_tokens": 204800,
+ "max_output_tokens": 204800,
+ "max_tokens": 204800,
+ "mode": "chat",
+ "output_cost_per_token": 1.2e-06,
+ "source": "https://fireworks.ai/models/fireworks/minimax-m2p1",
+ "supports_function_calling": true,
+ "supports_response_schema": true,
+ "supports_tool_choice": true
+ },
"fireworks_ai/nomic-ai/nomic-embed-text-v1": {
"input_cost_per_token": 8e-09,
"litellm_provider": "fireworks_ai-embedding-models",
diff --git a/tests/test_litellm/test_utils.py b/tests/test_litellm/test_utils.py
index 6170f6b6f55..5bfb3bd8795 100644
--- a/tests/test_litellm/test_utils.py
+++ b/tests/test_litellm/test_utils.py
@@ -2657,6 +2657,59 @@ def test_model_info_for_openrouter_kimi_k2_5():
print("openrouter kimi-k2.5 model info", model_info)
+def test_model_info_for_fireworks_short_form_models():
+ """
+ Test that fireworks_ai short-form model entries (fireworks_ai/<model>)
+ are correctly configured in model_prices_and_context_window.json.
+
+ These entries enable cost attribution for models called via short-form
+ names (e.g., fireworks_ai/glm-4p7 instead of
+ fireworks_ai/accounts/fireworks/models/glm-4p7).
+ """
+ import json
+ from pathlib import Path
+
+ json_path = Path(__file__).parents[2] / "model_prices_and_context_window.json"
+ with open(json_path) as f:
+ model_cost = json.load(f)
+
+ # glm-4p7: short-form and long-form
+ for key in [
+ "fireworks_ai/glm-4p7",
+ "fireworks_ai/accounts/fireworks/models/glm-4p7",
+ ]:
+ info = model_cost.get(key)
+ assert info is not None, f"{key} not found in model_prices_and_context_window.json"
+ assert info["litellm_provider"] == "fireworks_ai"
+ assert info["mode"] == "chat"
+ assert info["input_cost_per_token"] == 6e-07
+ assert info["output_cost_per_token"] == 2.2e-06
+ assert info["max_input_tokens"] == 202800
+ assert info["supports_reasoning"] is True
+
+ # minimax-m2p1: short-form and long-form
+ for key in [
+ "fireworks_ai/minimax-m2p1",
+ "fireworks_ai/accounts/fireworks/models/minimax-m2p1",
+ ]:
+ info = model_cost.get(key)
+ assert info is not None, f"{key} not found in model_prices_and_context_window.json"
+ assert info["litellm_provider"] == "fireworks_ai"
+ assert info["mode"] == "chat"
+ assert info["input_cost_per_token"] == 3e-07
+ assert info["output_cost_per_token"] == 1.2e-06
+ assert info["max_input_tokens"] == 204800
+
+ # kimi-k2p5: short-form only (long-form already existed)
+ info = model_cost.get("fireworks_ai/kimi-k2p5")
+ assert info is not None, "fireworks_ai/kimi-k2p5 not found in model_prices_and_context_window.json"
+ assert info["litellm_provider"] == "fireworks_ai"
+ assert info["mode"] == "chat"
+ assert info["input_cost_per_token"] == 6e-07
+ assert info["output_cost_per_token"] == 3e-06
+ assert info["max_input_tokens"] == 262144
+
+
class TestGetValidModelsWithCLI:
"""Test get_valid_models function as used in CLI token usage"""