From f9fa828ba79b7e24ee2831aff8a208c5966fc119 Mon Sep 17 00:00:00 2001 From: crabbytt Date: Fri, 23 Oct 2026 06:42:18 +0000 Subject: [PATCH] fix(cost-map): refresh Engy deepseek-v4.1-flash prices from live /v1/models --- ...odel_prices_and_context_window_backup.json | 28 +++++++++++++++++-- model_prices_and_context_window.json | 28 +++++++++++++++++-- .../llms/openai_like/test_engy_provider.py | 4 ++- 3 files changed, 53 insertions(+), 7 deletions(-) diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.json index 2c297817c6b..0e31ef826d5 100644 --- a/litellm/model_prices_and_context_window_backup.json +++ b/litellm/model_prices_and_context_window_backup.json @@ -78654,13 +78654,13 @@ "supports_web_search": true }, "engy/deepseek-v4.1-flash": { - "cache_read_input_token_cost": 8e-09, - "input_cost_per_token": 4e-08, + "cache_read_input_token_cost": 6e-09, + "input_cost_per_token": 3e-08, "litellm_provider": "engy", "max_input_tokens": 1048576, "max_tokens": 1048576, "mode": "chat", - "output_cost_per_token": 8e-08, + "output_cost_per_token": 1.2e-07, "source": "https://api.engy.ai/v1/models", "supported_endpoints": [ "/v1/chat/completions", @@ -78675,6 +78675,28 @@ "supports_tool_choice": true, "supports_vision": true }, + "engy/deepseek-v4.1-flash-1017": { + "cache_read_input_token_cost": 6e-09, + "input_cost_per_token": 3e-08, + "litellm_provider": "engy", + "max_input_tokens": 1048576, + "max_tokens": 1048576, + "mode": "chat", + "output_cost_per_token": 1.2e-07, + "source": "https://api.engy.ai/v1/models", + "supported_endpoints": [ + "/v1/chat/completions", + "/v1/responses", + "/v1/messages" + ], + "supports_function_calling": true, + "supports_native_streaming": true, + "supports_prompt_caching": true, + "supports_reasoning": true, + "supports_system_messages": true, + "supports_tool_choice": true, + "supports_vision": false + }, "engy/deepseek-v4-flash-0731": { "cache_read_input_token_cost": 9e-09, "input_cost_per_token": 4.5e-08, diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.json index 2c297817c6b..0e31ef826d5 100644 --- a/model_prices_and_context_window.json +++ b/model_prices_and_context_window.json @@ -78654,13 +78654,13 @@ "supports_web_search": true }, "engy/deepseek-v4.1-flash": { - "cache_read_input_token_cost": 8e-09, - "input_cost_per_token": 4e-08, + "cache_read_input_token_cost": 6e-09, + "input_cost_per_token": 3e-08, "litellm_provider": "engy", "max_input_tokens": 1048576, "max_tokens": 1048576, "mode": "chat", - "output_cost_per_token": 8e-08, + "output_cost_per_token": 1.2e-07, "source": "https://api.engy.ai/v1/models", "supported_endpoints": [ "/v1/chat/completions", @@ -78675,6 +78675,28 @@ "supports_tool_choice": true, "supports_vision": true }, + "engy/deepseek-v4.1-flash-1017": { + "cache_read_input_token_cost": 6e-09, + "input_cost_per_token": 3e-08, + "litellm_provider": "engy", + "max_input_tokens": 1048576, + "max_tokens": 1048576, + "mode": "chat", + "output_cost_per_token": 1.2e-07, + "source": "https://api.engy.ai/v1/models", + "supported_endpoints": [ + "/v1/chat/completions", + "/v1/responses", + "/v1/messages" + ], + "supports_function_calling": true, + "supports_native_streaming": true, + "supports_prompt_caching": true, + "supports_reasoning": true, + "supports_system_messages": true, + "supports_tool_choice": true, + "supports_vision": false + }, "engy/deepseek-v4-flash-0731": { "cache_read_input_token_cost": 9e-09, "input_cost_per_token": 4.5e-08, diff --git a/tests/unit/llms/openai_like/test_engy_provider.py b/tests/unit/llms/openai_like/test_engy_provider.py index 6fb59187c78..944d7dc3c68 100644 --- a/tests/unit/llms/openai_like/test_engy_provider.py +++ b/tests/unit/llms/openai_like/test_engy_provider.py @@ -256,7 +256,9 @@ def test_engy_chat_completion_cost_bills_cached_tokens_at_cache_read_rate(): def test_engy_models_are_registered_in_the_cost_map(): catalog: Final = {name for name, info in litellm.model_cost.items() if info.get("litellm_provider") == "engy"} - assert len(catalog) == 8 + assert len(catalog) == 9 + assert "engy/deepseek-v4.1-flash" in catalog + assert "engy/deepseek-v4.1-flash-1017" in catalog assert all(name.startswith("engy/") for name in catalog) info: Final = litellm.get_model_info(model=ENGY_MODEL)