TECHNOLOGY

LiteLLM preserves Bedrock regional pricing when a reply drops the region prefix

In this article
THE QUICK TAKE

Trace regional deployment identity through the response and spend row; a shorter returned model name must not silently select a different pricing source.

The November 13 LiteLLM v1.111.0-dev.2 prerelease fixes regional pricing identity on Bedrock Messages requests. A response naming the same model without its regional prefix should not erase the configured regional rate. Cost review should compare the deployment, provider response and recorded charge separately, including cached tokens and explicit overrides.

Separate request identity from response spelling

Configure a synthetic regional Bedrock profile and return the same underlying model without the prefix. Keep input and output usage fixed. Compare the pricing key used by the gateway with the deployment’s intended rate. This isolates the identity correction from tokenization or provider price changes. A correct answer and a recognizable model family do not establish that the accounting path retained the regional context of the original request.

Cached usage needs its own known contribution

Use a fixture with ordinary input, output and supported cached-token components. Compute the expected charge from a frozen test map outside the gateway. Compare the client-visible cost and persisted spend row. A total can look plausible while one cached component uses another rate, so make component counts deliberately different. Preserve zero-count controls to detect a default value being charged when the response did not report that usage.

Overrides and real model changes remain distinct

Add an explicit synthetic deployment price and assert it retains the documented precedence. Then return a genuinely different model in a separate fixture. The implementation preserves those cases rather than treating every name difference as cosmetic. An overly broad fix could keep the original regional price even when the service actually supplied another model. Test the distinction using recognizable identities instead of relying on similar strings.

Reconcile both streaming and complete responses

Replay the same synthetic usage through streaming and non-streaming Messages paths and match request identities across final accounting. The release fixes both shapes; success on one does not establish the other’s reconstructed usage. This is a gateway pricing correction, not a new Bedrock tariff announcement. A useful adoption report names the frozen map, resolved regional identity, override policy and agreement between visible cost and saved spend.

Sources

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles