test(cost): derive Nova cache expectations from registry and cite Gemini alias targets

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Devin AI 2026-09-15 20:38:52 +00:00
parent ae5451b07d
commit 65a2e4f503
2 changed files with 13 additions and 11 deletions

View file

@ -230,21 +230,21 @@ def test_bedrock_gpt_5_6_offers_tools_and_reasoning_effort_but_not_thinking(prof
@pytest.mark.parametrize(
"model,expected_cache_read",
"model",
[
("amazon.nova-lite-v1:0", 1.5e-8),
("us.amazon.nova-lite-v1:0", 1.5e-8),
("amazon.nova-micro-v1:0", 8.75e-9),
("us.amazon.nova-micro-v1:0", 8.75e-9),
("amazon.nova-pro-v1:0", 2e-7),
("us.amazon.nova-pro-v1:0", 2e-7),
("us.amazon.nova-premier-v1:0", 6.25e-7),
"amazon.nova-lite-v1:0",
"us.amazon.nova-lite-v1:0",
"amazon.nova-micro-v1:0",
"us.amazon.nova-micro-v1:0",
"amazon.nova-pro-v1:0",
"us.amazon.nova-pro-v1:0",
"us.amazon.nova-premier-v1:0",
],
)
def test_bedrock_nova_cache_read_prices(
model, expected_cache_read, local_model_cost_map
):
def test_bedrock_nova_cache_read_prices(model, local_model_cost_map):
model_info = litellm.model_cost[model]
expected_cache_read = model_info["cache_read_input_token_cost"]
assert 0 < expected_cache_read < model_info["input_cost_per_token"]
usage = Usage(
prompt_tokens=1_000,
completion_tokens=100,

View file

@ -452,6 +452,8 @@ def test_map_traffic_type_to_service_tier(
)
# Alias targets are the `modelVersion` returned by
# POST https://generativelanguage.googleapis.com/v1beta/models/<alias>:generateContent on 2026-09-15
@pytest.mark.parametrize(
"alias,target",
[