Skip to content

fix(model_prices): registry audit 2026-09-23, in-region Bedrock Claude prices - #42779

Merged
kerry-berri merged 9 commits into
mainfrom
litellm_registry_audit_2026_09_23
Sep 24, 2026
Merged

kerry-berri merged 9 commits into
mainfrom
litellm_registry_audit_2026_09_23

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

TLDR

Problem this solves:

  • Bare Bedrock Claude ids were priced at global rates, not in-region rates

How it solves it:

User Flow

Before: an app calling an in-region Bedrock Claude model sees spend about 10% below the AWS invoice

  1. They send POST https://litellm-domain/v1/chat/completions with "model": "bedrock/anthropic.claude-sonnet-4-6"
  2. The response comes back 200 and https://litellm-domain/ui/?page=logs shows the request billed at $3.00 in / $15.00 out per 1M tokens
  3. Their AWS invoice for the same call charges $3.30 / $16.50 per 1M tokens

After: the same request is billed at the in-region rate, matching the AWS invoice

  1. They send POST https://litellm-domain/v1/chat/completions with "model": "bedrock/anthropic.claude-sonnet-4-6"
  2. The response comes back 200 and https://litellm-domain/ui/?page=logs shows the request billed at $3.30 in / $16.50 out per 1M tokens
  3. Their AWS invoice matches the logged spend

Relevant issues

Fixes #42679

Changes by provider

AWS Bedrock (Anthropic)

Source: https://aws.amazon.com/bedrock/pricing/ (Anthropic tab, "Geo and In-region Cross-region Inference" table; the page is JS rendered, so the table was read in the browser after the curl'd HTML and the r.jina.ai render came back without the model rows). Bare model ids are in-region invocations, so they take the in-region rate. The global.* keys keep the global rate and the us.*, eu.*, apac.*, jp.*, au.* and us-gov* keys already carried these numbers on main

Fields set on each bare key: input_cost_per_token, output_cost_per_token, cache_creation_input_token_cost (5m cache write), cache_creation_input_token_cost_above_1hr (1h cache write), cache_read_input_token_cost

  • anthropic.claude-opus-4-5-20251101-v1:0, anthropic.claude-opus-4-6-v1, anthropic.claude-opus-4-7, anthropic.claude-opus-4-8, anthropic.claude-opus-5: $5.50 / $27.50 / $6.875 / $11.00 / $0.55 per 1M
  • anthropic.claude-sonnet-4-5-20250929-v1:0, anthropic.claude-sonnet-4-6: $3.30 / $16.50 / $4.125 / $6.60 / $0.33
  • anthropic.claude-sonnet-5: $2.20 / $11.00 / $2.75 / $4.40 / $0.22
  • anthropic.claude-haiku-4-5-20251001-v1:0: $1.10 / $5.50 / $1.375 / $2.20 / $0.11, batch $0.55 / $2.75
  • anthropic.claude-fable-5: $11.00 / $55.00 / $13.75 / $22.00 / $1.10
  • anthropic.claude-fable-5-1: $11.00 / $55.00 / $13.75 / $22.00 / $0.275
  • anthropic.claude-opus-5-5: $4.40 / $22.00 / $5.50 / $8.80 / $0.22 (same drift as the rows above, found in this audit)
  • anthropic.claude-sonnet-4-5-20250929-v1:0 also gets batch $1.65 / $8.25 and the long context (above 200k) fields set to the same values the us.anthropic.claude-sonnet-4-5-20250929-v1:0 entry already carries on main: $6.60 in, $24.75 out, $8.25 / $13.20 cache write, $0.66 cache read. The AWS page lists a "Claude Sonnet 4.5 - Long Context" row but its cells did not resolve in the render, so these come from the long context multiplier Anthropic documents (2x input, 1.5x output over the standard rate, https://docs.anthropic.com/en/docs/about-claude/pricing) applied to the in-region rate. Called out under caveats

Absorbed from #41775 is nothing, see below. Absorbed from #42698 (co-authored): the 11 bare-key price changes listed above, every value re-read from the AWS table and matching the PR. Greptile's finding on that PR (long context rates left at global) is addressed here

OpenRouter

This audit also corrected openrouter/deepseek/deepseek-v4-flash and openrouter/z-ai/glm-5.3 from GET https://openrouter.ai/api/v1/models, but #42832 landed the same sync on main first (with a newer deepseek-v4-flash price that matches the live API), so after merging main those rows carry main's values and are no longer part of this diff

Checked, no change needed

Not changed, could not verify

Open registry PRs left alone

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have added meaningful tests
  • The handful of test files covering my change pass locally, e.g. uv run pytest tests/test_litellm/<your_test_file>.py -v. Leave the suites (make test-unit-*, make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more
  • My PR passes all required CI/CD checks (e.g., lint, schema.d.ts sync check, etc.)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • I have received a Greptile Confidence Score of at least 4/5 before requesting a maintainer review (Greptile reviews automatically once the PR is opened; only comment @greptileai to re-request a review after pushing changes)

Delays in PR merge?

If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).

Screenshots / Proof of Fix

Tests added or changed in tests/test_litellm/test_utils.py:

  • test_bedrock_bare_claude_id_is_priced_in_region (new, 12 cases): each bare anthropic.claude-* key matches its us. profile on every cost field (input, output, 5m and 1h cache write, cache read, batch, above 200k) and is priced above its global. profile
  • test_get_model_info_bedrock_regional_inference_profile_pricing (LIT-4056): probed au.anthropic.claude-opus-4-8 vs the bare id and asserted regional > bare, which only held while the bare id carried the global rate. Repointed at eu.amazon.nova-pro-v1:0 vs amazon.nova-pro-v1:0, where the regional row still costs more; the bedrock/, bedrock/converse/, bedrock/invoke/ key resolution assertions are unchanged

Local checks at the tip: LITELLM_LOCAL_MODEL_COST_MAP=True uv run --no-sync pytest -q tests/test_litellm/test_utils.py -k "bare_claude or regional_inference_profile" reports 13 passed, python3 ci_cd/check_files_match.py passes and LITELLM_LOCAL_MODEL_COST_MAP=True uv run --no-sync pytest -q tests/test_litellm/test_model_prices_schema.py tests/test_litellm/test_model_cost_aliases.py reports 73 passed. ci_cd/generate_model_prices_schema.py produced no schema change

Type

🐛 Bug Fix

Caveats (if any)

Medium

  • Bare Bedrock ids are treated as in-region; a deployment routing bare ids through global profiles now overestimates by 10%
  • Sonnet 4.5 bare long context rates are derived (in-region rate x Anthropic multiplier), not read from an AWS cell

Low

  • LIT-4056 regression test now probes Nova instead of Claude Opus 4.8 for its regional > bare check

Final Attestation

  • The tests check the right things, including the edge cases, and regressions in the respective real-world customer use-cases are not possible after this PR

Link to Devin session: https://app.devin.ai/sessions/2de281eeae484d7e92904c8feaa36330
Open in Devin Desktop: https://app.devin.ai/desktop/session/2de281eeae484d7e92904c8feaa36330?variant=devin

devin-ai-integration Bot and others added 2 commits September 23, 2026 19:18
…e and OpenRouter price fixes

Absorbs #42698

Co-authored-by: coldStoneSoul <shekharpachlore@gmail.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration
devin-ai-integration Bot requested a review from a team September 23, 2026 19:22
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@greptile-apps

greptile-apps Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge, with the corrected pricing consistently represented across registries and protected by focused parity tests.

Summary

This PR corrects bare AWS Bedrock Claude model pricing to use in-region rates rather than cheaper global rates.

  • Updates standard, cache, batch, and applicable long-context pricing in both synchronized model-price registries.
  • Adds parity coverage comparing every cost field on each affected bare model with its us. profile.
  • Retains regional inference-profile resolution coverage using Amazon Nova pricing.
  • Extends the Rust model catalog with the existing 32k-tier pricing fields required for lossless registry deserialization and serialization.

Reviews (4) · Last reviewed commit: "fix(model-catalog): add above_32k cost f..."

Comment thread model_prices_and_context_window.json
@codspeed

codspeed Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing litellm_registry_audit_2026_09_23 (8a1afa6) with main (153f13b)1

Open in CodSpeed

Footnotes

  1. No successful run was found on main (b098063) during the generation of this report, so 153f13b was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@codecov

codecov Bot commented Sep 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

…on parity

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

@greptileai

1 similar comment
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

@greptileai

Comment thread tests/test_litellm/test_utils.py Outdated
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

@greptileai

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration devin-ai-integration Bot changed the title fix(model_prices): registry audit 2026-09-23, in-region Bedrock Claude and OpenRouter price fixes fix(model_prices): registry audit 2026-09-23, in-region Bedrock Claude prices Sep 24, 2026
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

@greptileai

@kerry-berri
kerry-berri merged commit a4f69e0 into main Sep 24, 2026
98 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Bedrock in-region (bare) Claude model IDs are priced at the global rate, but AWS bills 10% more

1 participant