From 569739912520f96567abf236c71cf57aeaacf260 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Wed, 28 Oct 2026 12:40:28 +0000 Subject: [PATCH] revert(cost-map): leave mistral-large-4 rows to #48825 Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- litellm/model_prices_and_context_window_backup.json | 12 ++++++------ model_prices_and_context_window.json | 12 ++++++------ tests/unit/test_mistral_large_4_model_metadata.py | 12 +++++------- 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.json index c51769920b5..4e6b4d51712 100644 --- a/litellm/model_prices_and_context_window_backup.json +++ b/litellm/model_prices_and_context_window_backup.json @@ -42055,13 +42055,13 @@ "mode": "embedding" }, "mistral/mistral-large-4": { - "cache_read_input_token_cost": 1.4e-07, - "input_cost_per_token": 1.36e-06, + "cache_read_input_token_cost": 6.8e-08, + "input_cost_per_token": 6.8e-07, "litellm_provider": "mistral", "max_input_tokens": 1048576, "max_output_tokens": 1048576, "mode": "chat", - "output_cost_per_token": 4.18e-06, + "output_cost_per_token": 2.09e-06, "reasoning_effort_levels": [ "none", "high" @@ -42076,13 +42076,13 @@ "supports_vision": true }, "mistral/mistral-large-4-0": { - "cache_read_input_token_cost": 1.4e-07, - "input_cost_per_token": 1.36e-06, + "cache_read_input_token_cost": 6.8e-08, + "input_cost_per_token": 6.8e-07, "litellm_provider": "mistral", "max_input_tokens": 1048576, "max_output_tokens": 1048576, "mode": "chat", - "output_cost_per_token": 4.18e-06, + "output_cost_per_token": 2.09e-06, "reasoning_effort_levels": [ "none", "high" diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.json index c51769920b5..4e6b4d51712 100644 --- a/model_prices_and_context_window.json +++ b/model_prices_and_context_window.json @@ -42055,13 +42055,13 @@ "mode": "embedding" }, "mistral/mistral-large-4": { - "cache_read_input_token_cost": 1.4e-07, - "input_cost_per_token": 1.36e-06, + "cache_read_input_token_cost": 6.8e-08, + "input_cost_per_token": 6.8e-07, "litellm_provider": "mistral", "max_input_tokens": 1048576, "max_output_tokens": 1048576, "mode": "chat", - "output_cost_per_token": 4.18e-06, + "output_cost_per_token": 2.09e-06, "reasoning_effort_levels": [ "none", "high" @@ -42076,13 +42076,13 @@ "supports_vision": true }, "mistral/mistral-large-4-0": { - "cache_read_input_token_cost": 1.4e-07, - "input_cost_per_token": 1.36e-06, + "cache_read_input_token_cost": 6.8e-08, + "input_cost_per_token": 6.8e-07, "litellm_provider": "mistral", "max_input_tokens": 1048576, "max_output_tokens": 1048576, "mode": "chat", - "output_cost_per_token": 4.18e-06, + "output_cost_per_token": 2.09e-06, "reasoning_effort_levels": [ "none", "high" diff --git a/tests/unit/test_mistral_large_4_model_metadata.py b/tests/unit/test_mistral_large_4_model_metadata.py index a945a5fdf93..f45c53920dd 100644 --- a/tests/unit/test_mistral_large_4_model_metadata.py +++ b/tests/unit/test_mistral_large_4_model_metadata.py @@ -32,7 +32,9 @@ def test_metadata_and_backup(model): assert info["litellm_provider"] == "mistral" assert info["mode"] == "chat" assert info["max_input_tokens"] == 1048576 - assert 0 < info["cache_read_input_token_cost"] < info["input_cost_per_token"] < info["output_cost_per_token"] + assert info["input_cost_per_token"] == 6.8e-07 + assert info["output_cost_per_token"] == 2.09e-06 + assert info["cache_read_input_token_cost"] == 6.8e-08 assert info["reasoning_effort_levels"] == ["none", "high"] for capability in ( "supports_vision", @@ -57,16 +59,12 @@ def test_reasoning_effort(model, effort): @pytest.mark.parametrize("model", MODELS) def test_completion_cost(model): - info = litellm.get_model_info(model) - input_rate = info["input_cost_per_token"] - output_rate = info["output_cost_per_token"] - cache_read_rate = info["cache_read_input_token_cost"] uncached_response = litellm.ModelResponse( model=model.split("/", 1)[1], usage={"prompt_tokens": 1000, "completion_tokens": 100, "total_tokens": 1100}, ) assert litellm.completion_cost(completion_response=uncached_response, model=model) == pytest.approx( - 1000 * input_rate + 100 * output_rate + 1000 * 6.8e-07 + 100 * 2.09e-06 ) response = litellm.ModelResponse( model=model.split("/", 1)[1], @@ -78,7 +76,7 @@ def test_completion_cost(model): }, ) assert litellm.completion_cost(completion_response=response, model=model) == pytest.approx( - 400 * input_rate + 600 * cache_read_rate + 100 * output_rate + 400 * 6.8e-07 + 600 * 6.8e-08 + 100 * 2.09e-06 )