diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.json index 0a5aa18f8b8..90c2b44b741 100644 --- a/litellm/model_prices_and_context_window_backup.json +++ b/litellm/model_prices_and_context_window_backup.json @@ -74783,6 +74783,30 @@ "supports_vision": false, "supports_web_search": false }, + "prism/deepseek-v4.1-flash": { + "cache_read_input_token_cost": 7e-08, + "input_cost_per_token": 3e-07, + "litellm_provider": "prism", + "max_input_tokens": 1000000, + "max_output_tokens": 384000, + "max_tokens": 384000, + "mode": "chat", + "output_cost_per_token": 1.2e-06, + "source": "https://prisminference.com/pricing", + "supported_endpoints": [ + "/v1/chat/completions", + "/v1/responses", + "/v1/messages" + ], + "supports_function_calling": true, + "supports_native_streaming": true, + "supports_parallel_function_calling": true, + "supports_prompt_caching": true, + "supports_reasoning": true, + "supports_response_schema": true, + "supports_system_messages": true, + "supports_tool_choice": true + }, "prism/deepseek-v4-flash": { "cache_read_input_token_cost": 7e-08, "input_cost_per_token": 1.4e-07, diff --git a/litellm/proxy/public_endpoints/provider_create_fields.json b/litellm/proxy/public_endpoints/provider_create_fields.json index fb15739ef45..7fcd57395e9 100644 --- a/litellm/proxy/public_endpoints/provider_create_fields.json +++ b/litellm/proxy/public_endpoints/provider_create_fields.json @@ -2747,7 +2747,7 @@ "default_value": null } ], - "default_model_placeholder": "prism/deepseek-v4-flash" + "default_model_placeholder": "prism/deepseek-v4.1-flash" }, { "provider": "RECRAFT", diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.json index 0a5aa18f8b8..90c2b44b741 100644 --- a/model_prices_and_context_window.json +++ b/model_prices_and_context_window.json @@ -74783,6 +74783,30 @@ "supports_vision": false, "supports_web_search": false }, + "prism/deepseek-v4.1-flash": { + "cache_read_input_token_cost": 7e-08, + "input_cost_per_token": 3e-07, + "litellm_provider": "prism", + "max_input_tokens": 1000000, + "max_output_tokens": 384000, + "max_tokens": 384000, + "mode": "chat", + "output_cost_per_token": 1.2e-06, + "source": "https://prisminference.com/pricing", + "supported_endpoints": [ + "/v1/chat/completions", + "/v1/responses", + "/v1/messages" + ], + "supports_function_calling": true, + "supports_native_streaming": true, + "supports_parallel_function_calling": true, + "supports_prompt_caching": true, + "supports_reasoning": true, + "supports_response_schema": true, + "supports_system_messages": true, + "supports_tool_choice": true + }, "prism/deepseek-v4-flash": { "cache_read_input_token_cost": 7e-08, "input_cost_per_token": 1.4e-07, diff --git a/tests/test_litellm/llms/openai_like/test_prism_provider.py b/tests/test_litellm/llms/openai_like/test_prism_provider.py index ca79947aa2d..a09738eab1b 100644 --- a/tests/test_litellm/llms/openai_like/test_prism_provider.py +++ b/tests/test_litellm/llms/openai_like/test_prism_provider.py @@ -41,22 +41,34 @@ def test_prism_provider_keeps_explicit_credentials(monkeypatch: pytest.MonkeyPat assert api_base == "https://prism.internal.example/v1" -def test_prism_model_cost_and_capabilities(): +@pytest.mark.parametrize( + ("model", "input_cost", "output_cost", "max_output_tokens"), + [ + ("prism/deepseek-v4.1-flash", 0.30, 1.20, 384_000), + ("prism/deepseek-v4-flash", 0.14, 0.28, 393_216), + ], +) +def test_prism_model_cost_and_capabilities( + model: str, + input_cost: float, + output_cost: float, + max_output_tokens: int, +): from litellm.cost_calculator import cost_per_token prompt_cost, completion_cost = cost_per_token( - model="prism/deepseek-v4-flash", + model=model, prompt_tokens=1_000_000, completion_tokens=1_000_000, custom_llm_provider="prism", ) - model_info = litellm.get_model_info("prism/deepseek-v4-flash") + model_info = litellm.get_model_info(model) - assert prompt_cost == pytest.approx(0.14) - assert completion_cost == pytest.approx(0.28) + assert prompt_cost == pytest.approx(input_cost) + assert completion_cost == pytest.approx(output_cost) assert model_info["cache_read_input_token_cost"] == pytest.approx(7e-08) assert model_info["max_input_tokens"] == 1_000_000 - assert model_info["max_output_tokens"] == 393_216 + assert model_info["max_output_tokens"] == max_output_tokens assert model_info["supports_function_calling"] is True assert model_info["supports_native_streaming"] is True assert model_info["supports_reasoning"] is True @@ -70,7 +82,7 @@ def test_prism_is_available_in_add_model_form(): assert prism["provider"] == "PRISM" assert prism["provider_display_name"] == "Prism" - assert prism["default_model_placeholder"] == "prism/deepseek-v4-flash" + assert prism["default_model_placeholder"] == "prism/deepseek-v4.1-flash" assert {field["key"]: field["required"] for field in prism["credential_fields"]} == { "api_base": False, "api_key": True,