Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

test(bedrock): pin Nova cache-read prices with dated AWS Price List citation

Devin AI5f0934309918
diff --git a/tests/test_litellm/llms/bedrock/test_cross_region_inference_profile_mapping.py b/tests/test_litellm/llms/bedrock/test_cross_region_inference_profile_mapping.py
index b12ca31c694..b1e85c4f5ea 100644
--- a/tests/test_litellm/llms/bedrock/test_cross_region_inference_profile_mapping.py
+++ b/tests/test_litellm/llms/bedrock/test_cross_region_inference_profile_mapping.py
@@ -229,22 +229,25 @@ def test_bedrock_gpt_5_6_offers_tools_and_reasoning_effort_but_not_thinking(prof
assert "output_config" not in supported
+# Cache-read prices are the `*-cache-read-input-tokens` usagetype rows of the AWS Price List API, us-east-1,
+# https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonBedrock/current/us-east-1/index.json on 2026-09-15
@pytest.mark.parametrize(
- "model",
+ "model,expected_cache_read",
[
- "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",
+ ("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),
],
)
-def test_bedrock_nova_cache_read_prices(model, local_model_cost_map):
+def test_bedrock_nova_cache_read_prices(
+ model, expected_cache_read, 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"]
+ assert model_info["cache_read_input_token_cost"] == expected_cache_read
usage = Usage(
prompt_tokens=1_000,
completion_tokens=100,