test(model_prices): cover Fireworks DeepSeek V4.1 costs

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
mateo 2026-09-12 00:49:26 +00:00
parent 6cffb31e5c
commit 115535c3ad

View file

@ -14,6 +14,8 @@ import os
import pytest
from litellm import completion_cost
from litellm.types.utils import Choices, Message, ModelResponse, Usage
from litellm.utils import get_model_info
@ -56,6 +58,20 @@ def test_bare_fireworks_ids_resolve_through_prefixed_entries():
assert info["max_output_tokens"] == expected["max_output_tokens"]
def test_deepseek_v4p1_flash_twin_costs():
for model in (
"fireworks_ai/deepseek-v4p1-flash",
"fireworks_ai/accounts/fireworks/models/deepseek-v4p1-flash",
):
response = ModelResponse(
model=model,
choices=[Choices(index=0, message=Message(role="assistant", content="ok"))],
usage=Usage(prompt_tokens=1000, completion_tokens=1000, total_tokens=2000),
)
cost = completion_cost(completion_response=response, model=model)
assert cost == pytest.approx(8.8e-04)
TWIN_PINNED_PRICES = {
"deepseek-v4-flash-0731": {
"input_cost_per_token": 2.2e-07,