Backtestslitellmrun-20261111-220245#48045
[Bug]: Bedrock claude_platform/ requests are logged with $0 spend
Our patch was judged better than the merged fix.
In this judgment, Patch A = our agent, Patch B = the merged fix.
Both patches fix the exact scenarios in the issue (bedrock/claude_platform/claude-opus-5-5 and the bare claude_platform/ form), and the independent tests confirm that. The difference is in how. Patch A addresses the root cause the issue names: it adds claude_platform/ to strip_bedrock_routing_prefix and overrides BedrockModelInfo.get_model_cost_key to map a Claude API id onto the existing Bedrock key (anthropic.<id>, with -v1:0 / -v1 fallbacks, verified against the cost map before use). This generalizes to any Claude model already priced for Bedrock, and for ids it cannot map it now raises ModelNotMappedError instead of the silent $0 fallback the issue complained about (seen in the claude-sonnet-4-5 alias run). Its tests directly reproduce the issue's cost_per_token/get_model_info/completion_cost calls and would fail on base. Patch B instead adds ~600 lines of per-model JSON entries (duplicated in two files) under bedrock/claude_platform/<id>, which works only for models explicitly listed and leaves the silent-zero path intact for anything else (the dated claude-sonnet-4-5-20250929 id still returns (0.0, 0.0) under B, exactly the failure mode reported). B also changes bedrock cost_per_token for every Bedrock model to apply a geo multiplier, a behavior change beyond the issue's ask that adds risk, and it has to whitelist claude_platform entries in an unrelated test. B's test is reasonable but data-driven over its own entries rather than over the issue's scenarios. A is the smaller, root-cause fix with stronger targeted tests; B masks the symptom with data and carries extra scope.
Four judges ruled on this ticket in parallel, and the verdict comes from counting their votes. Each saw the issue and the two patches, labelled A and B in random order (two of them saw ours as A), with issue links and version numbers removed. Where tests could check the fix, they also saw the results of tests a separate agent wrote for the issue, run on both patches. None was told which patch was ours. The reasoning above is one judge's, shown verbatim.
Solve
15m 25s
Wall-clock time in the container
Full test suite
Not run
The harness did not reach the test stage
Contamination audit
Clean
No sign the agent saw the real fix
Patch size
141vs 1,258 merged
Changed lines, ours vs merged
The issue
View on GitHubDescription
Every request routed through Claude Platform on AWS (bedrock/claude_platform/<model>, or claude_platform/<model> with
provider bedrock) gets spend = 0 in LiteLLM_SpendLogs. The proxy returns no x-litellm-response-cost header and
logs no cost-calculation error, so budgets and spend reports silently under-count Claude usage.
Other Bedrock routes for the same models are priced correctly. Examples: bedrock/converse/anthropic.claude-opus-5-5,bedrock/us.anthropic.claude-opus-5-5.
Cause
Claude Platform on AWS takes Claude API model IDs (claude-opus-5-5). The cost map stores Bedrock pricing under
Bedrock model IDs (anthropic.claude-opus-5-5), and no entry exists for claude_platform/....
strip_bedrock_routing_prefixdoes not removeclaude_platform/, soget_model_infosearches forclaude_platform/claude-opus-5-5.BedrockModelInfodoes not overrideget_model_cost_key, so nothing maps the Claude API ID to the Bedrock key.- The lookup then falls back to a capability-only entry with zero costs instead of raising, so the miss is silent.
Adding claude_platform/ to strip_bedrock_routing_prefix alone is not enough. The lookup then searches forclaude-opus-5-5 under provider bedrock. That key belongs to provider anthropic, so it is rejected and the cost is still 0.
Relevant log output
spend=0.0 model=claude_platform/claude-opus-5-5 custom_llm_provider=bedrock prompt_tokens=11 completion_tokens=5
model_map_information.model_map_key=claude_platform/claude-opus-5-5
Config
model_list:
- model_name: claude-opus-5-5
litellm_params:
model: bedrock/claude_platform/claude-opus-5-5
aws_region_name: eu-west-1
workspace_id: wrkspc_...
LiteLLM Version
1.106.2
Steps to Repro
model_list:
- model_name: claude-opus-5-5
litellm_params:
model: bedrock/claude_platform/claude-opus-5-5
aws_region_name: eu-west-1
workspace_id: wrkspc_...
import litellm
litellm.cost_per_token(model="bedrock/claude_platform/claude-opus-5-5", custom_llm_provider="bedrock",
prompt_tokens=1_000_000, completion_tokens=1_000_000)
# (0.0, 0.0) — expected (4.0, 20.0), same as anthropic.claude-opus-5-5
litellm.cost_per_token(model="anthropic.claude-opus-5-5", custom_llm_provider="bedrock",
prompt_tokens=1_000_000, completion_tokens=1_000_000)
# (4.0, 20.0)
With model: claude_platform/claude-opus-5-5 (no bedrock/ prefix) and provider bedrock, spend is also 0. The spend
log shows model_map_key: claude_platform/claude-opus-5-5.
Which part of LiteLLM is this about?
Spend tracking: spend logs, cost attribution, usage reports
How are you deploying?
Docker
The two patches
litellm/llms/bedrock/common_utils.pyindex 2b946d9664..4cbda69dd5 100644@@ -1001,7 +1001,17 @@ def bedrock_capability_model(model: str, base_model: object) -> str: def strip_bedrock_routing_prefix(model: str) -> str: """Strip LiteLLM routing prefixes from model name."""- for prefix in ["bedrock/", "chat_completions/", "converse/", "invoke/", "openai/", "mantle/", "nova-2/", "nova/"]:+ for prefix in [+ "bedrock/",+ "claude_platform/",+ "chat_completions/",+ "converse/",+ "invoke/",+ "openai/",+ "mantle/",+ "nova-2/",+ "nova/",+ ]: if model.startswith(prefix): model = model.split("/", 1)[1] return model@@ -1666,6 +1676,29 @@ class BedrockModelInfo(BaseLLMModelInfo): """ return BedrockTokenCounter() + def get_model_cost_key(self, model: str) -> str | None:+ """+ Claude Platform on AWS (``claude_platform/``) takes Claude API model ids (``claude-opus-5-5``), but the+ cost map prices them under Bedrock model ids (``anthropic.claude-opus-5-5``, or+ ``anthropic.claude-sonnet-4-5-20250929-v1:0`` / ``anthropic.claude-opus-4-6-v1``). The bare Claude API key belongs to provider+ ``anthropic``, so ``get_model_info`` rejects it for ``bedrock``; map it to the Bedrock key instead.+ """+ claude_api_id: Final = strip_bedrock_routing_prefix(model)+ if not claude_api_id.startswith("claude-"):+ return None+ return next(+ (+ key+ for key in (+ f"anthropic.{claude_api_id}",+ f"anthropic.{claude_api_id}-v1:0",+ f"anthropic.{claude_api_id}-v1",+ )+ if _model_cost_entry(key) is not None+ ),+ None,+ )+ @staticmethod def extract_model_name_from_arn(model: str) -> str: """Wrapper for standalone function. See extract_model_name_from_bedrock_arn()."""tests/unit/llms/bedrock/test_bedrock_common_utils.pyindex 7bde1805e1..31a60f8a02 100644@@ -2150,3 +2150,14 @@ def test_bedrock_response_stream_shape_is_unavailable_when_botocore_describes_th assert shape is None (logged,) = warning.call_args_list assert "only-in-the-description" not in logged.args[0] % logged.args[1:]+++@pytest.mark.parametrize(+ ("model", "expected"),+ [+ ("bedrock/claude_platform/claude-opus-5-5", "claude-opus-5-5"),+ ("claude_platform/claude-opus-5-5", "claude-opus-5-5"),+ ],+)+def test_strip_bedrock_routing_prefix_strips_claude_platform_route(model, expected):+ assert strip_bedrock_routing_prefix(model) == expectedtests/unit/llms/bedrock/test_claude_platform_provider.pyindex 2353a45139..4843e4f687 100644@@ -907,3 +907,98 @@ def test_sigv4_no_duplicate_content_type_when_caller_sets_lowercase(): "Duplicate keys produce 'application/json, application/json' in the " "SigV4 canonical string and cause a 401." )+++# --------------------------------------------------------------------------- #+# Claude Platform on AWS cost tracking #+# --------------------------------------------------------------------------- #+++@pytest.mark.parametrize("model", ["bedrock/claude_platform/claude-opus-5-5", "claude_platform/claude-opus-5-5"])+def test_claude_platform_cost_per_token_uses_bedrock_pricing(model, local_model_cost_map):+ import litellm++ prompt_cost, completion_cost = litellm.cost_per_token(+ model=model, custom_llm_provider="bedrock", prompt_tokens=1_000_000, completion_tokens=1_000_000+ )+ expected_prompt, expected_completion = litellm.cost_per_token(+ model="anthropic.claude-opus-5-5",+ custom_llm_provider="bedrock",+ prompt_tokens=1_000_000,+ completion_tokens=1_000_000,+ )++ assert (prompt_cost, completion_cost) == pytest.approx((4.0, 20.0))+ assert (prompt_cost, completion_cost) == pytest.approx((expected_prompt, expected_completion))+++@pytest.mark.parametrize("model", ["bedrock/claude_platform/claude-opus-5-5", "claude_platform/claude-opus-5-5"])+def test_claude_platform_model_info_resolves_to_bedrock_cost_map_key(model, local_model_cost_map):+ import litellm++ model_info = litellm.get_model_info(model=model, custom_llm_provider="bedrock")++ assert model_info["key"] == "anthropic.claude-opus-5-5"+ assert model_info["input_cost_per_token"] == pytest.approx(4e-06)+ assert model_info["output_cost_per_token"] == pytest.approx(2e-05)+++def test_claude_platform_dated_claude_api_id_maps_to_versioned_bedrock_key(local_model_cost_map):+ import litellm++ prompt_cost, completion_cost = litellm.cost_per_token(+ model="claude_platform/claude-sonnet-4-5-20250929",+ custom_llm_provider="bedrock",+ prompt_tokens=1_000_000,+ completion_tokens=1_000_000,+ )++ assert (prompt_cost, completion_cost) == pytest.approx(+ litellm.cost_per_token(+ model="anthropic.claude-sonnet-4-5-20250929-v1:0",+ custom_llm_provider="bedrock",+ prompt_tokens=1_000_000,+ completion_tokens=1_000_000,+ )+ )+ assert prompt_cost > 0+++def test_claude_platform_claude_api_id_maps_to_v1_suffixed_bedrock_key(local_model_cost_map):+ import litellm++ prompt_cost, completion_cost = litellm.cost_per_token(+ model="bedrock/claude_platform/claude-opus-4-6",+ custom_llm_provider="bedrock",+ prompt_tokens=1_000_000,+ completion_tokens=1_000_000,+ )++ assert (prompt_cost, completion_cost) == pytest.approx((5.0, 25.0))+++@pytest.mark.parametrize("response_model", ["claude-opus-5-5", "claude_platform/claude-opus-5-5"])+def test_claude_platform_completion_cost_is_not_zero(response_model, local_model_cost_map):+ import litellm+ from litellm.types.utils import ModelResponse, Usage++ response = ModelResponse(+ model=response_model,+ usage=Usage(prompt_tokens=1_000_000, completion_tokens=1_000_000, total_tokens=2_000_000),+ )++ cost = litellm.completion_cost(+ completion_response=response, model="claude_platform/claude-opus-5-5", custom_llm_provider="bedrock"+ )++ assert cost == pytest.approx(24.0)+++def test_bedrock_model_info_cost_key_ignores_non_claude_api_ids(local_model_cost_map):+ from litellm.llms.bedrock.common_utils import BedrockModelInfo++ model_info = BedrockModelInfo()++ assert model_info.get_model_cost_key("claude_platform/claude-opus-5-5") == "anthropic.claude-opus-5-5"+ assert model_info.get_model_cost_key("anthropic.claude-opus-5-5") is None+ assert model_info.get_model_cost_key("claude-not-a-real-model") is None
litellm/llms/bedrock/cost_calculation.pyindex 0a2e39ab972..1b45531dda4 100644@@ -3,9 +3,13 @@ Helper util for handling bedrock-specific cost calculation - e.g.: prompt caching """ -from typing import TYPE_CHECKING+from typing import TYPE_CHECKING, Final -from litellm.litellm_core_utils.llm_cost_calc.utils import generic_cost_per_token+import litellm+from litellm.litellm_core_utils.llm_cost_calc.utils import (+ generic_cost_per_token,+ get_provider_specific_geo_multiplier,+) if TYPE_CHECKING: from litellm.types.utils import Usage@@ -17,9 +21,13 @@ def cost_per_token(model: str, usage: "Usage", service_tier: str | None = None) Follows the same logic as Anthropic's cost per token calculation. """- return generic_cost_per_token(+ model_info: Final = litellm.get_model_info(model=model, custom_llm_provider="bedrock")+ prompt_cost, completion_cost = generic_cost_per_token( model=model, usage=usage, custom_llm_provider="bedrock", service_tier=service_tier,+ model_info=model_info, )+ geo_multiplier: Final = get_provider_specific_geo_multiplier(model_info=model_info, usage=usage)+ return prompt_cost * geo_multiplier, completion_cost * geo_multiplierlitellm/model_prices_and_context_window_backup.jsonindex eb9bf6aa8bf..c7dfce0712f 100644@@ -77996,5 +77996,605 @@ "supports_reasoning": true, "supports_vision": false, "source": "https://opencode.ai/v2/docs/console/go/"+ },+ "bedrock/claude_platform/claude-fable-5": {+ "supports_web_search": true,+ "supports_anthropic_compaction": true,+ "cache_creation_input_token_cost": 1.25e-05,+ "cache_creation_input_token_cost_above_1hr": 2e-05,+ "cache_creation_input_token_cost_batches": 6.25e-06,+ "cache_read_input_token_cost": 1e-06,+ "cache_read_input_token_cost_batches": 5e-07,+ "input_cost_per_token": 1e-05,+ "input_cost_per_token_batches": 5e-06,+ "litellm_provider": "bedrock",+ "max_input_tokens": 1000000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "chat",+ "output_cost_per_token": 5e-05,+ "output_cost_per_token_batches": 2.5e-05,+ "search_context_cost_per_query": {+ "search_context_size_high": 0.01,+ "search_context_size_low": 0.01,+ "search_context_size_medium": 0.01+ },+ "supports_adaptive_thinking": true,+ "thinking_always_on": true,+ "supports_mid_conversation_system": true,+ "supports_assistant_prefill": false,+ "supports_computer_use": true,+ "supports_function_calling": true,+ "supports_pdf_input": true,+ "supports_prompt_caching": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_sampling_params": false,+ "supports_tool_choice": true,+ "supports_vision": true,+ "supports_xhigh_reasoning_effort": true,+ "supports_max_reasoning_effort": true,+ "provider_specific_entry": {+ "us": 1.1+ },+ "supports_output_config": true,+ "prompt_cache_min_tokens": 512,+ "supports_native_structured_output": true,+ "source": "https://platform.claude.com/docs/en/about-claude/pricing#claude-platform-on-aws-pricing"+ },+ "bedrock/claude_platform/claude-fable-5-1": {+ "supports_web_search": true,+ "supports_anthropic_compaction": true,+ "cache_creation_input_token_cost": 1.25e-05,+ "cache_creation_input_token_cost_above_1hr": 2e-05,+ "cache_creation_input_token_cost_batches": 6.25e-06,+ "cache_read_input_token_cost": 2.5e-07,+ "cache_read_input_token_cost_batches": 1.25e-07,+ "input_cost_per_token": 1e-05,+ "input_cost_per_token_batches": 5e-06,+ "litellm_provider": "bedrock",+ "max_input_tokens": 1000000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "chat",+ "output_cost_per_token": 5e-05,+ "output_cost_per_token_batches": 2.5e-05,+ "search_context_cost_per_query": {+ "search_context_size_high": 0.01,+ "search_context_size_low": 0.01,+ "search_context_size_medium": 0.01+ },+ "supports_adaptive_thinking": true,+ "thinking_always_on": true,+ "supports_mid_conversation_system": true,+ "supports_assistant_prefill": false,+ "supports_computer_use": true,+ "supports_forced_tool_use": false,+ "supports_function_calling": true,+ "supports_pdf_input": true,+ "supports_prompt_caching": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_sampling_params": false,+ "supports_tool_choice": true,+ "supports_vision": true,+ "supports_xhigh_reasoning_effort": true,+ "supports_max_reasoning_effort": true,+ "provider_specific_entry": {+ "us": 1.1+ },+ "supports_output_config": true,+ "prompt_cache_min_tokens": 512,+ "supports_native_structured_output": true,+ "source": "https://platform.claude.com/docs/en/about-claude/pricing#claude-platform-on-aws-pricing"+ },+ "bedrock/claude_platform/claude-haiku-4-5": {+ "cache_creation_input_token_cost": 1.25e-06,+ "cache_creation_input_token_cost_above_1hr": 2e-06,+ "cache_creation_input_token_cost_batches": 6.25e-07,+ "cache_read_input_token_cost": 1e-07,+ "cache_read_input_token_cost_batches": 5e-08,+ "input_cost_per_token": 1e-06,+ "input_cost_per_token_batches": 5e-07,+ "litellm_provider": "bedrock",+ "max_input_tokens": 200000,+ "max_output_tokens": 64000,+ "max_tokens": 64000,+ "mode": "chat",+ "output_cost_per_token": 5e-06,+ "output_cost_per_token_batches": 2.5e-06,+ "supports_assistant_prefill": true,+ "supports_function_calling": true,+ "supports_native_structured_output": true,+ "supports_computer_use": true,+ "supports_pdf_input": true,+ "supports_prompt_caching": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_tool_choice": true,+ "supports_vision": true,+ "prompt_cache_min_tokens": 4096,+ "source": "https://platform.claude.com/docs/en/about-claude/pricing#claude-platform-on-aws-pricing"+ },+ "bedrock/claude_platform/claude-haiku-5-5": {+ "input_cost_per_token_above_100k_tokens_batches": 2.5e-07,+ "output_cost_per_token_above_100k_tokens_batches": 1.25e-06,+ "cache_creation_input_token_cost_above_100k_tokens_batches": 3.125e-07,+ "cache_read_input_token_cost_above_100k_tokens_batches": 2.5e-08,+ "supports_anthropic_compaction": true,+ "cache_creation_input_token_cost": 1.25e-07,+ "cache_creation_input_token_cost_above_1hr": 2e-07,+ "cache_creation_input_token_cost_batches": 6.25e-08,+ "cache_read_input_token_cost": 1e-08,+ "cache_read_input_token_cost_batches": 5e-09,+ "input_cost_per_token": 1e-07,+ "input_cost_per_token_batches": 5e-08,+ "litellm_provider": "bedrock",+ "max_input_tokens": 1000000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "chat",+ "output_cost_per_token": 5e-07,+ "output_cost_per_token_batches": 2.5e-07,+ "search_context_cost_per_query": {+ "search_context_size_high": 0.01,+ "search_context_size_low": 0.01,+ "search_context_size_medium": 0.01+ },+ "supports_adaptive_thinking": true,+ "supports_mid_conversation_system": true,+ "supports_assistant_prefill": false,+ "supports_computer_use": true,+ "supports_function_calling": true,+ "supports_native_structured_output": true,+ "supports_pdf_input": true,+ "supports_prompt_caching": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_sampling_params": false,+ "supports_tool_choice": true,+ "supports_vision": true,+ "supports_xhigh_reasoning_effort": true,+ "supports_max_reasoning_effort": true,+ "provider_specific_entry": {+ "us": 1.1+ },+ "supports_output_config": true,+ "supports_forced_tool_use": true,+ "thinking_always_on": false,+ "prompt_cache_min_tokens": 512,+ "source": "https://platform.claude.com/docs/en/about-claude/pricing#claude-platform-on-aws-pricing",+ "supports_web_search": true,+ "input_cost_per_token_above_100k_tokens": 5e-07,+ "output_cost_per_token_above_100k_tokens": 2.5e-06,+ "cache_creation_input_token_cost_above_100k_tokens": 6.25e-07,+ "cache_creation_input_token_cost_above_1hr_above_100k_tokens": 1e-06,+ "cache_read_input_token_cost_above_100k_tokens": 5e-08+ },+ "bedrock/claude_platform/claude-opus-4-5": {+ "cache_creation_input_token_cost": 6.25e-06,+ "cache_creation_input_token_cost_above_1hr": 1e-05,+ "cache_creation_input_token_cost_batches": 3.125e-06,+ "cache_read_input_token_cost": 5e-07,+ "cache_read_input_token_cost_batches": 2.5e-07,+ "input_cost_per_token": 5e-06,+ "input_cost_per_token_batches": 2.5e-06,+ "litellm_provider": "bedrock",+ "max_input_tokens": 200000,+ "max_output_tokens": 64000,+ "max_tokens": 64000,+ "mode": "chat",+ "output_cost_per_token": 2.5e-05,+ "output_cost_per_token_batches": 1.25e-05,+ "search_context_cost_per_query": {+ "search_context_size_high": 0.01,+ "search_context_size_low": 0.01,+ "search_context_size_medium": 0.01+ },+ "supports_assistant_prefill": true,+ "supports_computer_use": true,+ "supports_function_calling": true,+ "supports_pdf_input": true,+ "supports_prompt_caching": true,+ "supports_thinking_cache_preservation": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_native_structured_output": true,+ "supports_tool_choice": true,+ "supports_vision": true,+ "supports_output_config": true,+ "prompt_cache_min_tokens": 4096,+ "source": "https://platform.claude.com/docs/en/about-claude/pricing#claude-platform-on-aws-pricing"+ },+ "bedrock/claude_platform/claude-opus-4-6": {+ "supports_web_search": true,+ "supports_anthropic_compaction": true,+ "cache_creation_input_token_cost": 6.25e-06,+ "cache_creation_input_token_cost_above_1hr": 1e-05,+ "cache_creation_input_token_cost_batches": 3.125e-06,+ "cache_read_input_token_cost": 5e-07,+ "cache_read_input_token_cost_batches": 2.5e-07,+ "input_cost_per_token": 5e-06,+ "input_cost_per_token_batches": 2.5e-06,+ "litellm_provider": "bedrock",+ "max_input_tokens": 1000000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "chat",+ "output_cost_per_token": 2.5e-05,+ "output_cost_per_token_batches": 1.25e-05,+ "search_context_cost_per_query": {+ "search_context_size_high": 0.01,+ "search_context_size_low": 0.01,+ "search_context_size_medium": 0.01+ },+ "supports_adaptive_thinking": true,+ "supports_legacy_thinking": true,+ "supports_assistant_prefill": false,+ "supports_computer_use": true,+ "supports_function_calling": true,+ "supports_pdf_input": true,+ "supports_prompt_caching": true,+ "supports_thinking_cache_preservation": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_native_structured_output": true,+ "supports_tool_choice": true,+ "supports_vision": true,+ "provider_specific_entry": {+ "us": 1.1+ },+ "supports_output_config": true,+ "supports_max_reasoning_effort": true,+ "prompt_cache_min_tokens": 4096,+ "source": "https://platform.claude.com/docs/en/about-claude/pricing#claude-platform-on-aws-pricing"+ },+ "bedrock/claude_platform/claude-opus-4-7": {+ "supports_web_search": true,+ "supports_anthropic_compaction": true,+ "cache_creation_input_token_cost": 6.25e-06,+ "cache_creation_input_token_cost_above_1hr": 1e-05,+ "cache_creation_input_token_cost_batches": 3.125e-06,+ "cache_read_input_token_cost": 5e-07,+ "cache_read_input_token_cost_batches": 2.5e-07,+ "input_cost_per_token": 5e-06,+ "input_cost_per_token_batches": 2.5e-06,+ "litellm_provider": "bedrock",+ "max_input_tokens": 1000000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "chat",+ "output_cost_per_token": 2.5e-05,+ "output_cost_per_token_batches": 1.25e-05,+ "search_context_cost_per_query": {+ "search_context_size_high": 0.01,+ "search_context_size_low": 0.01,+ "search_context_size_medium": 0.01+ },+ "supports_adaptive_thinking": true,+ "supports_assistant_prefill": false,+ "supports_computer_use": true,+ "supports_function_calling": true,+ "supports_pdf_input": true,+ "supports_prompt_caching": true,+ "supports_thinking_cache_preservation": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_native_structured_output": true,+ "supports_sampling_params": false,+ "supports_tool_choice": true,+ "supports_vision": true,+ "supports_xhigh_reasoning_effort": true,+ "supports_max_reasoning_effort": true,+ "provider_specific_entry": {+ "us": 1.1+ },+ "supports_output_config": true,+ "prompt_cache_min_tokens": 2048,+ "source": "https://platform.claude.com/docs/en/about-claude/pricing#claude-platform-on-aws-pricing"+ },+ "bedrock/claude_platform/claude-opus-4-8": {+ "supports_web_search": true,+ "supports_anthropic_compaction": true,+ "cache_creation_input_token_cost": 6.25e-06,+ "cache_creation_input_token_cost_above_1hr": 1e-05,+ "cache_creation_input_token_cost_batches": 3.125e-06,+ "cache_read_input_token_cost": 5e-07,+ "cache_read_input_token_cost_batches": 2.5e-07,+ "input_cost_per_token": 5e-06,+ "input_cost_per_token_batches": 2.5e-06,+ "litellm_provider": "bedrock",+ "max_input_tokens": 1000000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "chat",+ "output_cost_per_token": 2.5e-05,+ "output_cost_per_token_batches": 1.25e-05,+ "search_context_cost_per_query": {+ "search_context_size_high": 0.01,+ "search_context_size_low": 0.01,+ "search_context_size_medium": 0.01+ },+ "supports_adaptive_thinking": true,+ "supports_mid_conversation_system": true,+ "supports_assistant_prefill": false,+ "supports_computer_use": true,+ "supports_function_calling": true,+ "supports_pdf_input": true,+ "supports_prompt_caching": true,+ "supports_thinking_cache_preservation": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_native_structured_output": true,+ "supports_sampling_params": false,+ "supports_tool_choice": true,+ "supports_vision": true,+ "supports_xhigh_reasoning_effort": true,+ "supports_max_reasoning_effort": true,+ "provider_specific_entry": {+ "us": 1.1+ },+ "supports_output_config": true,+ "prompt_cache_min_tokens": 1024,+ "source": "https://platform.claude.com/docs/en/about-claude/pricing#claude-platform-on-aws-pricing"+ },+ "bedrock/claude_platform/claude-opus-5": {+ "supports_web_search": true,+ "supports_anthropic_compaction": true,+ "cache_creation_input_token_cost": 6.25e-06,+ "cache_creation_input_token_cost_above_1hr": 1e-05,+ "cache_creation_input_token_cost_batches": 3.125e-06,+ "cache_read_input_token_cost": 5e-07,+ "cache_read_input_token_cost_batches": 2.5e-07,+ "input_cost_per_token": 5e-06,+ "input_cost_per_token_batches": 2.5e-06,+ "litellm_provider": "bedrock",+ "max_input_tokens": 1000000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "chat",+ "output_cost_per_token": 2.5e-05,+ "output_cost_per_token_batches": 1.25e-05,+ "search_context_cost_per_query": {+ "search_context_size_high": 0.01,+ "search_context_size_low": 0.01,+ "search_context_size_medium": 0.01+ },+ "supports_adaptive_thinking": true,+ "supports_mid_conversation_system": true,+ "supports_assistant_prefill": false,+ "supports_computer_use": true,+ "supports_function_calling": true,+ "supports_pdf_input": true,+ "supports_prompt_caching": true,+ "supports_thinking_cache_preservation": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_native_structured_output": true,+ "supports_sampling_params": false,+ "supports_tool_choice": true,+ "supports_vision": true,+ "supports_xhigh_reasoning_effort": true,+ "supports_max_reasoning_effort": true,+ "provider_specific_entry": {+ "us": 1.1+ },+ "supports_output_config": true,+ "prompt_cache_min_tokens": 512,+ "source": "https://platform.claude.com/docs/en/about-claude/pricing#claude-platform-on-aws-pricing"+ },+ "bedrock/claude_platform/claude-opus-5-5": {+ "supports_web_search": true,+ "supports_anthropic_compaction": true,+ "cache_creation_input_token_cost": 5e-06,+ "cache_creation_input_token_cost_above_1hr": 8e-06,+ "cache_creation_input_token_cost_batches": 2.5e-06,+ "cache_read_input_token_cost": 2e-07,+ "cache_read_input_token_cost_batches": 1e-07,+ "input_cost_per_token": 4e-06,+ "input_cost_per_token_batches": 2e-06,+ "litellm_provider": "bedrock",+ "max_input_tokens": 1000000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "chat",+ "output_cost_per_token": 2e-05,+ "output_cost_per_token_batches": 1e-05,+ "search_context_cost_per_query": {+ "search_context_size_high": 0.01,+ "search_context_size_low": 0.01,+ "search_context_size_medium": 0.01+ },+ "supports_adaptive_thinking": true,+ "thinking_always_on": true,+ "supports_mid_conversation_system": true,+ "supports_assistant_prefill": false,+ "supports_computer_use": true,+ "supports_forced_tool_use": false,+ "supports_function_calling": true,+ "supports_pdf_input": true,+ "supports_prompt_caching": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_native_structured_output": true,+ "supports_sampling_params": false,+ "supports_tool_choice": true,+ "supports_vision": true,+ "supports_xhigh_reasoning_effort": true,+ "supports_max_reasoning_effort": true,+ "provider_specific_entry": {+ "us": 1.1+ },+ "supports_output_config": true,+ "prompt_cache_min_tokens": 512,+ "source": "https://platform.claude.com/docs/en/about-claude/pricing#claude-platform-on-aws-pricing"+ },+ "bedrock/claude_platform/claude-sonnet-4-5": {+ "cache_creation_input_token_cost": 3.75e-06,+ "cache_creation_input_token_cost_above_1hr": 6e-06,+ "cache_read_input_token_cost": 3e-07,+ "input_cost_per_token": 3e-06,+ "cache_creation_input_token_cost_batches": 1.875e-06,+ "cache_read_input_token_cost_batches": 1.5e-07,+ "deprecation_date": "2026-11-30",+ "input_cost_per_token_batches": 1.5e-06,+ "litellm_provider": "bedrock",+ "max_input_tokens": 200000,+ "max_output_tokens": 64000,+ "max_tokens": 64000,+ "mode": "chat",+ "output_cost_per_token": 1.5e-05,+ "output_cost_per_token_batches": 7.5e-06,+ "search_context_cost_per_query": {+ "search_context_size_high": 0.01,+ "search_context_size_low": 0.01,+ "search_context_size_medium": 0.01+ },+ "supports_assistant_prefill": true,+ "supports_computer_use": true,+ "supports_function_calling": true,+ "supports_pdf_input": true,+ "supports_prompt_caching": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_native_structured_output": true,+ "supports_tool_choice": true,+ "supports_vision": true,+ "prompt_cache_min_tokens": 1024,+ "source": "https://platform.claude.com/docs/en/about-claude/pricing#claude-platform-on-aws-pricing"+ },+ "bedrock/claude_platform/claude-sonnet-4-6": {+ "supports_web_search": true,+ "supports_anthropic_compaction": true,+ "cache_creation_input_token_cost": 3.75e-06,+ "cache_creation_input_token_cost_above_1hr": 6e-06,+ "cache_creation_input_token_cost_batches": 1.875e-06,+ "cache_read_input_token_cost": 3e-07,+ "cache_read_input_token_cost_batches": 1.5e-07,+ "input_cost_per_token": 3e-06,+ "input_cost_per_token_batches": 1.5e-06,+ "litellm_provider": "bedrock",+ "max_input_tokens": 1000000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "chat",+ "output_cost_per_token": 1.5e-05,+ "output_cost_per_token_batches": 7.5e-06,+ "search_context_cost_per_query": {+ "search_context_size_high": 0.01,+ "search_context_size_low": 0.01,+ "search_context_size_medium": 0.01+ },+ "supports_adaptive_thinking": true,+ "supports_legacy_thinking": true,+ "supports_assistant_prefill": false,+ "supports_computer_use": true,+ "supports_function_calling": true,+ "supports_pdf_input": true,+ "supports_prompt_caching": true,+ "supports_thinking_cache_preservation": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_native_structured_output": true,+ "supports_max_reasoning_effort": true,+ "supports_tool_choice": true,+ "supports_vision": true,+ "supports_output_config": true,+ "prompt_cache_min_tokens": 1024,+ "provider_specific_entry": {+ "us": 1.1+ },+ "source": "https://platform.claude.com/docs/en/about-claude/pricing#claude-platform-on-aws-pricing"+ },+ "bedrock/claude_platform/claude-sonnet-5": {+ "supports_web_search": true,+ "supports_anthropic_compaction": true,+ "cache_creation_input_token_cost": 2.5e-06,+ "cache_creation_input_token_cost_above_1hr": 4e-06,+ "cache_creation_input_token_cost_batches": 1.25e-06,+ "cache_read_input_token_cost": 2e-07,+ "cache_read_input_token_cost_batches": 1e-07,+ "input_cost_per_token": 2e-06,+ "input_cost_per_token_batches": 1e-06,+ "litellm_provider": "bedrock",+ "max_input_tokens": 1000000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "chat",+ "output_cost_per_token": 1e-05,+ "output_cost_per_token_batches": 5e-06,+ "search_context_cost_per_query": {+ "search_context_size_high": 0.01,+ "search_context_size_low": 0.01,+ "search_context_size_medium": 0.01+ },+ "supports_adaptive_thinking": true,+ "supports_mid_conversation_system": true,+ "supports_assistant_prefill": false,+ "supports_computer_use": true,+ "supports_function_calling": true,+ "supports_native_structured_output": true,+ "supports_pdf_input": true,+ "supports_prompt_caching": true,+ "supports_thinking_cache_preservation": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_sampling_params": false,+ "supports_tool_choice": true,+ "supports_vision": true,+ "supports_xhigh_reasoning_effort": true,+ "supports_max_reasoning_effort": true,+ "provider_specific_entry": {+ "us": 1.1+ },+ "supports_output_config": true,+ "prompt_cache_min_tokens": 1024,+ "source": "https://platform.claude.com/docs/en/about-claude/pricing#claude-platform-on-aws-pricing"+ },+ "bedrock/claude_platform/claude-sonnet-5-5": {+ "supports_anthropic_compaction": true,+ "cache_creation_input_token_cost": 2.5e-06,+ "cache_creation_input_token_cost_above_1hr": 4e-06,+ "cache_creation_input_token_cost_batches": 1.25e-06,+ "cache_read_input_token_cost": 1e-07,+ "cache_read_input_token_cost_batches": 5e-08,+ "input_cost_per_token": 2e-06,+ "input_cost_per_token_batches": 1e-06,+ "litellm_provider": "bedrock",+ "max_input_tokens": 1000000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "chat",+ "output_cost_per_token": 1e-05,+ "output_cost_per_token_batches": 5e-06,+ "search_context_cost_per_query": {+ "search_context_size_high": 0.01,+ "search_context_size_low": 0.01,+ "search_context_size_medium": 0.01+ },+ "supports_adaptive_thinking": true,+ "supports_mid_conversation_system": true,+ "supports_assistant_prefill": false,+ "supports_computer_use": true,+ "supports_function_calling": true,+ "supports_native_structured_output": true,+ "supports_pdf_input": true,+ "supports_prompt_caching": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_sampling_params": false,+ "supports_tool_choice": true,+ "supports_vision": true,+ "supports_xhigh_reasoning_effort": true,+ "supports_max_reasoning_effort": true,+ "provider_specific_entry": {+ "us": 1.1+ },+ "supports_output_config": true,+ "supports_forced_tool_use": false,+ "thinking_always_on": true,+ "prompt_cache_min_tokens": 512,+ "source": "https://platform.claude.com/docs/en/about-claude/pricing#claude-platform-on-aws-pricing",+ "supports_web_search": true } }model_prices_and_context_window.jsonindex eb9bf6aa8bf..c7dfce0712f 100644@@ -77996,5 +77996,605 @@ "supports_reasoning": true, "supports_vision": false, "source": "https://opencode.ai/v2/docs/console/go/"+ },+ "bedrock/claude_platform/claude-fable-5": {+ "supports_web_search": true,+ "supports_anthropic_compaction": true,+ "cache_creation_input_token_cost": 1.25e-05,+ "cache_creation_input_token_cost_above_1hr": 2e-05,+ "cache_creation_input_token_cost_batches": 6.25e-06,+ "cache_read_input_token_cost": 1e-06,+ "cache_read_input_token_cost_batches": 5e-07,+ "input_cost_per_token": 1e-05,+ "input_cost_per_token_batches": 5e-06,+ "litellm_provider": "bedrock",+ "max_input_tokens": 1000000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "chat",+ "output_cost_per_token": 5e-05,+ "output_cost_per_token_batches": 2.5e-05,+ "search_context_cost_per_query": {+ "search_context_size_high": 0.01,+ "search_context_size_low": 0.01,+ "search_context_size_medium": 0.01+ },+ "supports_adaptive_thinking": true,+ "thinking_always_on": true,+ "supports_mid_conversation_system": true,+ "supports_assistant_prefill": false,+ "supports_computer_use": true,+ "supports_function_calling": true,+ "supports_pdf_input": true,+ "supports_prompt_caching": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_sampling_params": false,+ "supports_tool_choice": true,+ "supports_vision": true,+ "supports_xhigh_reasoning_effort": true,+ "supports_max_reasoning_effort": true,+ "provider_specific_entry": {+ "us": 1.1+ },+ "supports_output_config": true,+ "prompt_cache_min_tokens": 512,+ "supports_native_structured_output": true,+ "source": "https://platform.claude.com/docs/en/about-claude/pricing#claude-platform-on-aws-pricing"+ },+ "bedrock/claude_platform/claude-fable-5-1": {+ "supports_web_search": true,+ "supports_anthropic_compaction": true,+ "cache_creation_input_token_cost": 1.25e-05,+ "cache_creation_input_token_cost_above_1hr": 2e-05,+ "cache_creation_input_token_cost_batches": 6.25e-06,+ "cache_read_input_token_cost": 2.5e-07,+ "cache_read_input_token_cost_batches": 1.25e-07,+ "input_cost_per_token": 1e-05,+ "input_cost_per_token_batches": 5e-06,+ "litellm_provider": "bedrock",+ "max_input_tokens": 1000000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "chat",+ "output_cost_per_token": 5e-05,+ "output_cost_per_token_batches": 2.5e-05,+ "search_context_cost_per_query": {+ "search_context_size_high": 0.01,+ "search_context_size_low": 0.01,+ "search_context_size_medium": 0.01+ },+ "supports_adaptive_thinking": true,+ "thinking_always_on": true,+ "supports_mid_conversation_system": true,+ "supports_assistant_prefill": false,+ "supports_computer_use": true,+ "supports_forced_tool_use": false,+ "supports_function_calling": true,+ "supports_pdf_input": true,+ "supports_prompt_caching": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_sampling_params": false,+ "supports_tool_choice": true,+ "supports_vision": true,+ "supports_xhigh_reasoning_effort": true,+ "supports_max_reasoning_effort": true,+ "provider_specific_entry": {+ "us": 1.1+ },+ "supports_output_config": true,+ "prompt_cache_min_tokens": 512,+ "supports_native_structured_output": true,+ "source": "https://platform.claude.com/docs/en/about-claude/pricing#claude-platform-on-aws-pricing"+ },+ "bedrock/claude_platform/claude-haiku-4-5": {+ "cache_creation_input_token_cost": 1.25e-06,+ "cache_creation_input_token_cost_above_1hr": 2e-06,+ "cache_creation_input_token_cost_batches": 6.25e-07,+ "cache_read_input_token_cost": 1e-07,+ "cache_read_input_token_cost_batches": 5e-08,+ "input_cost_per_token": 1e-06,+ "input_cost_per_token_batches": 5e-07,+ "litellm_provider": "bedrock",+ "max_input_tokens": 200000,+ "max_output_tokens": 64000,+ "max_tokens": 64000,+ "mode": "chat",+ "output_cost_per_token": 5e-06,+ "output_cost_per_token_batches": 2.5e-06,+ "supports_assistant_prefill": true,+ "supports_function_calling": true,+ "supports_native_structured_output": true,+ "supports_computer_use": true,+ "supports_pdf_input": true,+ "supports_prompt_caching": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_tool_choice": true,+ "supports_vision": true,+ "prompt_cache_min_tokens": 4096,+ "source": "https://platform.claude.com/docs/en/about-claude/pricing#claude-platform-on-aws-pricing"+ },+ "bedrock/claude_platform/claude-haiku-5-5": {+ "input_cost_per_token_above_100k_tokens_batches": 2.5e-07,+ "output_cost_per_token_above_100k_tokens_batches": 1.25e-06,+ "cache_creation_input_token_cost_above_100k_tokens_batches": 3.125e-07,+ "cache_read_input_token_cost_above_100k_tokens_batches": 2.5e-08,+ "supports_anthropic_compaction": true,+ "cache_creation_input_token_cost": 1.25e-07,+ "cache_creation_input_token_cost_above_1hr": 2e-07,+ "cache_creation_input_token_cost_batches": 6.25e-08,+ "cache_read_input_token_cost": 1e-08,+ "cache_read_input_token_cost_batches": 5e-09,+ "input_cost_per_token": 1e-07,+ "input_cost_per_token_batches": 5e-08,+ "litellm_provider": "bedrock",+ "max_input_tokens": 1000000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "chat",+ "output_cost_per_token": 5e-07,+ "output_cost_per_token_batches": 2.5e-07,+ "search_context_cost_per_query": {+ "search_context_size_high": 0.01,+ "search_context_size_low": 0.01,+ "search_context_size_medium": 0.01+ },+ "supports_adaptive_thinking": true,+ "supports_mid_conversation_system": true,+ "supports_assistant_prefill": false,+ "supports_computer_use": true,+ "supports_function_calling": true,+ "supports_native_structured_output": true,+ "supports_pdf_input": true,+ "supports_prompt_caching": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_sampling_params": false,+ "supports_tool_choice": true,+ "supports_vision": true,+ "supports_xhigh_reasoning_effort": true,+ "supports_max_reasoning_effort": true,+ "provider_specific_entry": {+ "us": 1.1+ },+ "supports_output_config": true,+ "supports_forced_tool_use": true,+ "thinking_always_on": false,+ "prompt_cache_min_tokens": 512,+ "source": "https://platform.claude.com/docs/en/about-claude/pricing#claude-platform-on-aws-pricing",+ "supports_web_search": true,+ "input_cost_per_token_above_100k_tokens": 5e-07,+ "output_cost_per_token_above_100k_tokens": 2.5e-06,+ "cache_creation_input_token_cost_above_100k_tokens": 6.25e-07,+ "cache_creation_input_token_cost_above_1hr_above_100k_tokens": 1e-06,+ "cache_read_input_token_cost_above_100k_tokens": 5e-08+ },+ "bedrock/claude_platform/claude-opus-4-5": {+ "cache_creation_input_token_cost": 6.25e-06,+ "cache_creation_input_token_cost_above_1hr": 1e-05,+ "cache_creation_input_token_cost_batches": 3.125e-06,+ "cache_read_input_token_cost": 5e-07,+ "cache_read_input_token_cost_batches": 2.5e-07,+ "input_cost_per_token": 5e-06,+ "input_cost_per_token_batches": 2.5e-06,+ "litellm_provider": "bedrock",+ "max_input_tokens": 200000,+ "max_output_tokens": 64000,+ "max_tokens": 64000,+ "mode": "chat",+ "output_cost_per_token": 2.5e-05,+ "output_cost_per_token_batches": 1.25e-05,+ "search_context_cost_per_query": {+ "search_context_size_high": 0.01,+ "search_context_size_low": 0.01,+ "search_context_size_medium": 0.01+ },+ "supports_assistant_prefill": true,+ "supports_computer_use": true,+ "supports_function_calling": true,+ "supports_pdf_input": true,+ "supports_prompt_caching": true,+ "supports_thinking_cache_preservation": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_native_structured_output": true,+ "supports_tool_choice": true,+ "supports_vision": true,+ "supports_output_config": true,+ "prompt_cache_min_tokens": 4096,+ "source": "https://platform.claude.com/docs/en/about-claude/pricing#claude-platform-on-aws-pricing"+ },+ "bedrock/claude_platform/claude-opus-4-6": {+ "supports_web_search": true,+ "supports_anthropic_compaction": true,+ "cache_creation_input_token_cost": 6.25e-06,+ "cache_creation_input_token_cost_above_1hr": 1e-05,+ "cache_creation_input_token_cost_batches": 3.125e-06,+ "cache_read_input_token_cost": 5e-07,+ "cache_read_input_token_cost_batches": 2.5e-07,+ "input_cost_per_token": 5e-06,+ "input_cost_per_token_batches": 2.5e-06,+ "litellm_provider": "bedrock",+ "max_input_tokens": 1000000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "chat",+ "output_cost_per_token": 2.5e-05,+ "output_cost_per_token_batches": 1.25e-05,+ "search_context_cost_per_query": {+ "search_context_size_high": 0.01,+ "search_context_size_low": 0.01,+ "search_context_size_medium": 0.01+ },+ "supports_adaptive_thinking": true,+ "supports_legacy_thinking": true,+ "supports_assistant_prefill": false,+ "supports_computer_use": true,+ "supports_function_calling": true,+ "supports_pdf_input": true,+ "supports_prompt_caching": true,+ "supports_thinking_cache_preservation": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_native_structured_output": true,+ "supports_tool_choice": true,+ "supports_vision": true,+ "provider_specific_entry": {+ "us": 1.1+ },+ "supports_output_config": true,+ "supports_max_reasoning_effort": true,+ "prompt_cache_min_tokens": 4096,+ "source": "https://platform.claude.com/docs/en/about-claude/pricing#claude-platform-on-aws-pricing"+ },+ "bedrock/claude_platform/claude-opus-4-7": {+ "supports_web_search": true,+ "supports_anthropic_compaction": true,+ "cache_creation_input_token_cost": 6.25e-06,+ "cache_creation_input_token_cost_above_1hr": 1e-05,+ "cache_creation_input_token_cost_batches": 3.125e-06,+ "cache_read_input_token_cost": 5e-07,+ "cache_read_input_token_cost_batches": 2.5e-07,+ "input_cost_per_token": 5e-06,+ "input_cost_per_token_batches": 2.5e-06,+ "litellm_provider": "bedrock",+ "max_input_tokens": 1000000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "chat",+ "output_cost_per_token": 2.5e-05,+ "output_cost_per_token_batches": 1.25e-05,+ "search_context_cost_per_query": {+ "search_context_size_high": 0.01,+ "search_context_size_low": 0.01,+ "search_context_size_medium": 0.01+ },+ "supports_adaptive_thinking": true,+ "supports_assistant_prefill": false,+ "supports_computer_use": true,+ "supports_function_calling": true,+ "supports_pdf_input": true,+ "supports_prompt_caching": true,+ "supports_thinking_cache_preservation": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_native_structured_output": true,+ "supports_sampling_params": false,+ "supports_tool_choice": true,+ "supports_vision": true,+ "supports_xhigh_reasoning_effort": true,+ "supports_max_reasoning_effort": true,+ "provider_specific_entry": {+ "us": 1.1+ },+ "supports_output_config": true,+ "prompt_cache_min_tokens": 2048,+ "source": "https://platform.claude.com/docs/en/about-claude/pricing#claude-platform-on-aws-pricing"+ },+ "bedrock/claude_platform/claude-opus-4-8": {+ "supports_web_search": true,+ "supports_anthropic_compaction": true,+ "cache_creation_input_token_cost": 6.25e-06,+ "cache_creation_input_token_cost_above_1hr": 1e-05,+ "cache_creation_input_token_cost_batches": 3.125e-06,+ "cache_read_input_token_cost": 5e-07,+ "cache_read_input_token_cost_batches": 2.5e-07,+ "input_cost_per_token": 5e-06,+ "input_cost_per_token_batches": 2.5e-06,+ "litellm_provider": "bedrock",+ "max_input_tokens": 1000000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "chat",+ "output_cost_per_token": 2.5e-05,+ "output_cost_per_token_batches": 1.25e-05,+ "search_context_cost_per_query": {+ "search_context_size_high": 0.01,+ "search_context_size_low": 0.01,+ "search_context_size_medium": 0.01+ },+ "supports_adaptive_thinking": true,+ "supports_mid_conversation_system": true,+ "supports_assistant_prefill": false,+ "supports_computer_use": true,+ "supports_function_calling": true,+ "supports_pdf_input": true,+ "supports_prompt_caching": true,+ "supports_thinking_cache_preservation": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_native_structured_output": true,+ "supports_sampling_params": false,+ "supports_tool_choice": true,+ "supports_vision": true,+ "supports_xhigh_reasoning_effort": true,+ "supports_max_reasoning_effort": true,+ "provider_specific_entry": {+ "us": 1.1+ },+ "supports_output_config": true,+ "prompt_cache_min_tokens": 1024,+ "source": "https://platform.claude.com/docs/en/about-claude/pricing#claude-platform-on-aws-pricing"+ },+ "bedrock/claude_platform/claude-opus-5": {+ "supports_web_search": true,+ "supports_anthropic_compaction": true,+ "cache_creation_input_token_cost": 6.25e-06,+ "cache_creation_input_token_cost_above_1hr": 1e-05,+ "cache_creation_input_token_cost_batches": 3.125e-06,+ "cache_read_input_token_cost": 5e-07,+ "cache_read_input_token_cost_batches": 2.5e-07,+ "input_cost_per_token": 5e-06,+ "input_cost_per_token_batches": 2.5e-06,+ "litellm_provider": "bedrock",+ "max_input_tokens": 1000000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "chat",+ "output_cost_per_token": 2.5e-05,+ "output_cost_per_token_batches": 1.25e-05,+ "search_context_cost_per_query": {+ "search_context_size_high": 0.01,+ "search_context_size_low": 0.01,+ "search_context_size_medium": 0.01+ },+ "supports_adaptive_thinking": true,+ "supports_mid_conversation_system": true,+ "supports_assistant_prefill": false,+ "supports_computer_use": true,+ "supports_function_calling": true,+ "supports_pdf_input": true,+ "supports_prompt_caching": true,+ "supports_thinking_cache_preservation": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_native_structured_output": true,+ "supports_sampling_params": false,+ "supports_tool_choice": true,+ "supports_vision": true,+ "supports_xhigh_reasoning_effort": true,+ "supports_max_reasoning_effort": true,+ "provider_specific_entry": {+ "us": 1.1+ },+ "supports_output_config": true,+ "prompt_cache_min_tokens": 512,+ "source": "https://platform.claude.com/docs/en/about-claude/pricing#claude-platform-on-aws-pricing"+ },+ "bedrock/claude_platform/claude-opus-5-5": {+ "supports_web_search": true,+ "supports_anthropic_compaction": true,+ "cache_creation_input_token_cost": 5e-06,+ "cache_creation_input_token_cost_above_1hr": 8e-06,+ "cache_creation_input_token_cost_batches": 2.5e-06,+ "cache_read_input_token_cost": 2e-07,+ "cache_read_input_token_cost_batches": 1e-07,+ "input_cost_per_token": 4e-06,+ "input_cost_per_token_batches": 2e-06,+ "litellm_provider": "bedrock",+ "max_input_tokens": 1000000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "chat",+ "output_cost_per_token": 2e-05,+ "output_cost_per_token_batches": 1e-05,+ "search_context_cost_per_query": {+ "search_context_size_high": 0.01,+ "search_context_size_low": 0.01,+ "search_context_size_medium": 0.01+ },+ "supports_adaptive_thinking": true,+ "thinking_always_on": true,+ "supports_mid_conversation_system": true,+ "supports_assistant_prefill": false,+ "supports_computer_use": true,+ "supports_forced_tool_use": false,+ "supports_function_calling": true,+ "supports_pdf_input": true,+ "supports_prompt_caching": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_native_structured_output": true,+ "supports_sampling_params": false,+ "supports_tool_choice": true,+ "supports_vision": true,+ "supports_xhigh_reasoning_effort": true,+ "supports_max_reasoning_effort": true,+ "provider_specific_entry": {+ "us": 1.1+ },+ "supports_output_config": true,+ "prompt_cache_min_tokens": 512,+ "source": "https://platform.claude.com/docs/en/about-claude/pricing#claude-platform-on-aws-pricing"+ },+ "bedrock/claude_platform/claude-sonnet-4-5": {+ "cache_creation_input_token_cost": 3.75e-06,+ "cache_creation_input_token_cost_above_1hr": 6e-06,+ "cache_read_input_token_cost": 3e-07,+ "input_cost_per_token": 3e-06,+ "cache_creation_input_token_cost_batches": 1.875e-06,+ "cache_read_input_token_cost_batches": 1.5e-07,+ "deprecation_date": "2026-11-30",+ "input_cost_per_token_batches": 1.5e-06,+ "litellm_provider": "bedrock",+ "max_input_tokens": 200000,+ "max_output_tokens": 64000,+ "max_tokens": 64000,+ "mode": "chat",+ "output_cost_per_token": 1.5e-05,+ "output_cost_per_token_batches": 7.5e-06,+ "search_context_cost_per_query": {+ "search_context_size_high": 0.01,+ "search_context_size_low": 0.01,+ "search_context_size_medium": 0.01+ },+ "supports_assistant_prefill": true,+ "supports_computer_use": true,+ "supports_function_calling": true,+ "supports_pdf_input": true,+ "supports_prompt_caching": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_native_structured_output": true,+ "supports_tool_choice": true,+ "supports_vision": true,+ "prompt_cache_min_tokens": 1024,+ "source": "https://platform.claude.com/docs/en/about-claude/pricing#claude-platform-on-aws-pricing"+ },+ "bedrock/claude_platform/claude-sonnet-4-6": {+ "supports_web_search": true,+ "supports_anthropic_compaction": true,+ "cache_creation_input_token_cost": 3.75e-06,+ "cache_creation_input_token_cost_above_1hr": 6e-06,+ "cache_creation_input_token_cost_batches": 1.875e-06,+ "cache_read_input_token_cost": 3e-07,+ "cache_read_input_token_cost_batches": 1.5e-07,+ "input_cost_per_token": 3e-06,+ "input_cost_per_token_batches": 1.5e-06,+ "litellm_provider": "bedrock",+ "max_input_tokens": 1000000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "chat",+ "output_cost_per_token": 1.5e-05,+ "output_cost_per_token_batches": 7.5e-06,+ "search_context_cost_per_query": {+ "search_context_size_high": 0.01,+ "search_context_size_low": 0.01,+ "search_context_size_medium": 0.01+ },+ "supports_adaptive_thinking": true,+ "supports_legacy_thinking": true,+ "supports_assistant_prefill": false,+ "supports_computer_use": true,+ "supports_function_calling": true,+ "supports_pdf_input": true,+ "supports_prompt_caching": true,+ "supports_thinking_cache_preservation": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_native_structured_output": true,+ "supports_max_reasoning_effort": true,+ "supports_tool_choice": true,+ "supports_vision": true,+ "supports_output_config": true,+ "prompt_cache_min_tokens": 1024,+ "provider_specific_entry": {+ "us": 1.1+ },+ "source": "https://platform.claude.com/docs/en/about-claude/pricing#claude-platform-on-aws-pricing"+ },+ "bedrock/claude_platform/claude-sonnet-5": {+ "supports_web_search": true,+ "supports_anthropic_compaction": true,+ "cache_creation_input_token_cost": 2.5e-06,+ "cache_creation_input_token_cost_above_1hr": 4e-06,+ "cache_creation_input_token_cost_batches": 1.25e-06,+ "cache_read_input_token_cost": 2e-07,+ "cache_read_input_token_cost_batches": 1e-07,+ "input_cost_per_token": 2e-06,+ "input_cost_per_token_batches": 1e-06,+ "litellm_provider": "bedrock",+ "max_input_tokens": 1000000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "chat",+ "output_cost_per_token": 1e-05,+ "output_cost_per_token_batches": 5e-06,+ "search_context_cost_per_query": {+ "search_context_size_high": 0.01,+ "search_context_size_low": 0.01,+ "search_context_size_medium": 0.01+ },+ "supports_adaptive_thinking": true,+ "supports_mid_conversation_system": true,+ "supports_assistant_prefill": false,+ "supports_computer_use": true,+ "supports_function_calling": true,+ "supports_native_structured_output": true,+ "supports_pdf_input": true,+ "supports_prompt_caching": true,+ "supports_thinking_cache_preservation": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_sampling_params": false,+ "supports_tool_choice": true,+ "supports_vision": true,+ "supports_xhigh_reasoning_effort": true,+ "supports_max_reasoning_effort": true,+ "provider_specific_entry": {+ "us": 1.1+ },+ "supports_output_config": true,+ "prompt_cache_min_tokens": 1024,+ "source": "https://platform.claude.com/docs/en/about-claude/pricing#claude-platform-on-aws-pricing"+ },+ "bedrock/claude_platform/claude-sonnet-5-5": {+ "supports_anthropic_compaction": true,+ "cache_creation_input_token_cost": 2.5e-06,+ "cache_creation_input_token_cost_above_1hr": 4e-06,+ "cache_creation_input_token_cost_batches": 1.25e-06,+ "cache_read_input_token_cost": 1e-07,+ "cache_read_input_token_cost_batches": 5e-08,+ "input_cost_per_token": 2e-06,+ "input_cost_per_token_batches": 1e-06,+ "litellm_provider": "bedrock",+ "max_input_tokens": 1000000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "chat",+ "output_cost_per_token": 1e-05,+ "output_cost_per_token_batches": 5e-06,+ "search_context_cost_per_query": {+ "search_context_size_high": 0.01,+ "search_context_size_low": 0.01,+ "search_context_size_medium": 0.01+ },+ "supports_adaptive_thinking": true,+ "supports_mid_conversation_system": true,+ "supports_assistant_prefill": false,+ "supports_computer_use": true,+ "supports_function_calling": true,+ "supports_native_structured_output": true,+ "supports_pdf_input": true,+ "supports_prompt_caching": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_sampling_params": false,+ "supports_tool_choice": true,+ "supports_vision": true,+ "supports_xhigh_reasoning_effort": true,+ "supports_max_reasoning_effort": true,+ "provider_specific_entry": {+ "us": 1.1+ },+ "supports_output_config": true,+ "supports_forced_tool_use": false,+ "thinking_always_on": true,+ "prompt_cache_min_tokens": 512,+ "source": "https://platform.claude.com/docs/en/about-claude/pricing#claude-platform-on-aws-pricing",+ "supports_web_search": true } }tests/unit/llms/bedrock/test_cost_calculation.pynew file mode 100644index 00000000000..f4718344e7e@@ -0,0 +1,43 @@+import json+from importlib.resources import files+from typing import Final++import pytest++import litellm+from litellm.types.utils import Usage++CLAUDE_PLATFORM_PREFIX: Final = "bedrock/claude_platform/"+CLAUDE_PLATFORM_KEYS: Final = tuple(+ key+ for key in json.loads(files("litellm").joinpath("model_prices_and_context_window_backup.json").read_text())+ if key.startswith(CLAUDE_PLATFORM_PREFIX)+)+++def test_claude_platform_rows_exist() -> None:+ assert CLAUDE_PLATFORM_KEYS+++@pytest.mark.parametrize("inference_geo", ["global", "us"])+@pytest.mark.parametrize("key", CLAUDE_PLATFORM_KEYS)+def test_claude_platform_cost_matches_claude_api_cost(+ local_model_cost_map: None, key: str, inference_geo: str+) -> None:+ usage: Final = Usage(+ prompt_tokens=1_000,+ completion_tokens=200,+ cache_read_input_tokens=300,+ cache_creation_input_tokens=250,+ inference_geo=inference_geo,+ )++ claude_platform_cost: Final = litellm.cost_per_token(+ model=key.removeprefix("bedrock/"), custom_llm_provider="bedrock", usage_object=usage+ )+ claude_api_cost: Final = litellm.cost_per_token(+ model=key.removeprefix(CLAUDE_PLATFORM_PREFIX), custom_llm_provider="anthropic", usage_object=usage+ )++ assert claude_platform_cost == pytest.approx(claude_api_cost)+ assert sum(claude_platform_cost) > 0tests/unit/test_utils_get_model_info.pyindex 4bd16a2997f..302a7d60cdd 100644@@ -160,6 +160,7 @@ def _enforce_bedrock_converse_models( info.get("litellm_provider") == "bedrock" and info.get("mode") == "chat" and model not in whitelist_models+ and BedrockModelInfo.get_bedrock_route(model) != "claude_platform" and not ( (base_model := BedrockModelInfo.get_base_model(model)) != model and model_cost.get(base_model, {}).get("litellm_provider") == "bedrock_converse"