18 views
-/https://github.com/berriai/litellm/issues/24669
GitHub ยท issue

#24669 [Bug]: Bedrock cross-region inference pricing entries in cost map are unreachable due to lookup order

  • State: open
  • Author: @tmsk8219
  • Labels: llm translation

## What happened?

When using Bedrock cross-region inference models (e.g., `bedrock/us.anthropic.claude-sonnet-4-6`), the region-specific pricing entries in `model_prices_and_context_window.json` are never matched. Instead, the base model entry (`anthropic.claude-sonnet-4-6`) is always used, and region-specific pricing differences are silently ignored.

### Root Cause

The model cost lookup in `_get_model_info_helper` (`litellm/utils.py:5606`) checks candidates in this order:

1. `combined_model_name` โ€” `bedrock/us.anthropic.claude-sonnet-4-6` โ†’ no match (no such key in cost map) 2. `model` โ€” `bedrock/us.anthropic.claude-sonnet-4-6` โ†’ same, no match 3. `combined_stripped_model_name` โ€” `anthropic.claude-sonnet-4-6` โ†’ **matches base model here** 4. `stripped_model_name` โ€” `anthropic.claude-sonnet-4-6` โ†’ never reached 5. `split_model` โ€” `us.anthropic.claude-sonnet-4-6` โ†’ **never reached**

`_strip_model_name` (`utils.py:5244`) calls `_get_base_bedrock_model` (`litellm/llms/bedrock/common_utils.py:443`), which strips both the `bedrock/` routing prefix **and** the cross-region prefix (`us.`, `eu.`, `jp.`, etc. defined in `get_bedrock_cross_region_inference_regions()` at line 411). This โ€ฆ

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (1 events)
#0 of 0 ยท 31d17h52m47s ago โ€” entered ยท #import:https:::github.com:berriai:litellm post #2989
The dashboard work is harder because it likely spans multiple frontend routes, shared styling primitives, and visual regression checks, while the backend issue is comparatively localized to candidate ordering with focused regression tests.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search