mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-27 01:22:18 +00:00
fix(providers): align Prism pricing and limits with the live catalog
deepseek-v4.1-flash bills 0.17/0.63 USD per 1M input/output tokens and takes image input; deepseek-v4-flash bills 0.17/0.21 and caps output at 384000 tokens, per GET /v1/models
This commit is contained in:
parent
ea3cadd3e2
commit
6c371f76fd
3 changed files with 26 additions and 21 deletions
|
|
@ -74785,13 +74785,13 @@
|
|||
},
|
||||
"prism/deepseek-v4.1-flash": {
|
||||
"cache_read_input_token_cost": 7e-08,
|
||||
"input_cost_per_token": 3e-07,
|
||||
"input_cost_per_token": 1.7e-07,
|
||||
"litellm_provider": "prism",
|
||||
"max_input_tokens": 1000000,
|
||||
"max_output_tokens": 384000,
|
||||
"max_tokens": 384000,
|
||||
"mode": "chat",
|
||||
"output_cost_per_token": 1.2e-06,
|
||||
"output_cost_per_token": 6.3e-07,
|
||||
"source": "https://prisminference.com/pricing",
|
||||
"supported_endpoints": [
|
||||
"/v1/chat/completions",
|
||||
|
|
@ -74805,17 +74805,18 @@
|
|||
"supports_reasoning": true,
|
||||
"supports_response_schema": true,
|
||||
"supports_system_messages": true,
|
||||
"supports_tool_choice": true
|
||||
"supports_tool_choice": true,
|
||||
"supports_vision": true
|
||||
},
|
||||
"prism/deepseek-v4-flash": {
|
||||
"cache_read_input_token_cost": 7e-08,
|
||||
"input_cost_per_token": 1.4e-07,
|
||||
"input_cost_per_token": 1.7e-07,
|
||||
"litellm_provider": "prism",
|
||||
"max_input_tokens": 1000000,
|
||||
"max_output_tokens": 393216,
|
||||
"max_tokens": 393216,
|
||||
"max_output_tokens": 384000,
|
||||
"max_tokens": 384000,
|
||||
"mode": "chat",
|
||||
"output_cost_per_token": 2.8e-07,
|
||||
"output_cost_per_token": 2.1e-07,
|
||||
"source": "https://prisminference.com/pricing",
|
||||
"supported_endpoints": [
|
||||
"/v1/chat/completions",
|
||||
|
|
@ -74829,6 +74830,7 @@
|
|||
"supports_reasoning": true,
|
||||
"supports_response_schema": true,
|
||||
"supports_system_messages": true,
|
||||
"supports_tool_choice": true
|
||||
"supports_tool_choice": true,
|
||||
"supports_vision": false
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74785,13 +74785,13 @@
|
|||
},
|
||||
"prism/deepseek-v4.1-flash": {
|
||||
"cache_read_input_token_cost": 7e-08,
|
||||
"input_cost_per_token": 3e-07,
|
||||
"input_cost_per_token": 1.7e-07,
|
||||
"litellm_provider": "prism",
|
||||
"max_input_tokens": 1000000,
|
||||
"max_output_tokens": 384000,
|
||||
"max_tokens": 384000,
|
||||
"mode": "chat",
|
||||
"output_cost_per_token": 1.2e-06,
|
||||
"output_cost_per_token": 6.3e-07,
|
||||
"source": "https://prisminference.com/pricing",
|
||||
"supported_endpoints": [
|
||||
"/v1/chat/completions",
|
||||
|
|
@ -74805,17 +74805,18 @@
|
|||
"supports_reasoning": true,
|
||||
"supports_response_schema": true,
|
||||
"supports_system_messages": true,
|
||||
"supports_tool_choice": true
|
||||
"supports_tool_choice": true,
|
||||
"supports_vision": true
|
||||
},
|
||||
"prism/deepseek-v4-flash": {
|
||||
"cache_read_input_token_cost": 7e-08,
|
||||
"input_cost_per_token": 1.4e-07,
|
||||
"input_cost_per_token": 1.7e-07,
|
||||
"litellm_provider": "prism",
|
||||
"max_input_tokens": 1000000,
|
||||
"max_output_tokens": 393216,
|
||||
"max_tokens": 393216,
|
||||
"max_output_tokens": 384000,
|
||||
"max_tokens": 384000,
|
||||
"mode": "chat",
|
||||
"output_cost_per_token": 2.8e-07,
|
||||
"output_cost_per_token": 2.1e-07,
|
||||
"source": "https://prisminference.com/pricing",
|
||||
"supported_endpoints": [
|
||||
"/v1/chat/completions",
|
||||
|
|
@ -74829,6 +74830,7 @@
|
|||
"supports_reasoning": true,
|
||||
"supports_response_schema": true,
|
||||
"supports_system_messages": true,
|
||||
"supports_tool_choice": true
|
||||
"supports_tool_choice": true,
|
||||
"supports_vision": false
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,17 +52,17 @@ def test_prism_provider_keeps_explicit_credentials(monkeypatch: pytest.MonkeyPat
|
|||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("model", "input_cost", "output_cost", "max_output_tokens"),
|
||||
("model", "input_cost", "output_cost", "supports_vision"),
|
||||
[
|
||||
("prism/deepseek-v4.1-flash", 0.30, 1.20, 384_000),
|
||||
("prism/deepseek-v4-flash", 0.14, 0.28, 393_216),
|
||||
("prism/deepseek-v4.1-flash", 0.17, 0.63, True),
|
||||
("prism/deepseek-v4-flash", 0.17, 0.21, False),
|
||||
],
|
||||
)
|
||||
def test_prism_model_cost_and_capabilities(
|
||||
model: str,
|
||||
input_cost: float,
|
||||
output_cost: float,
|
||||
max_output_tokens: int,
|
||||
supports_vision: bool,
|
||||
):
|
||||
from litellm.cost_calculator import cost_per_token
|
||||
|
||||
|
|
@ -78,11 +78,12 @@ def test_prism_model_cost_and_capabilities(
|
|||
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"] == max_output_tokens
|
||||
assert model_info["max_output_tokens"] == 384_000
|
||||
assert model_info["supports_function_calling"] is True
|
||||
assert model_info["supports_native_streaming"] is True
|
||||
assert model_info["supports_reasoning"] is True
|
||||
assert model_info["supports_response_schema"] is True
|
||||
assert litellm.supports_vision(model) is supports_vision
|
||||
|
||||
|
||||
def test_prism_is_available_in_add_model_form():
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue