Skip to content

feat(bedrock): add 17 aws-bedrock cost map rows from provider sync - #42852

Merged
kerry-berri merged 4 commits into
mainfrom
litellm_sync_aws-bedrock
Sep 24, 2026
Merged

kerry-berri merged 4 commits into
mainfrom
litellm_sync_aws-bedrock

Conversation

@devin-ai-integration

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

Copy link
Copy Markdown
Contributor

TLDR

Problem this solves:

  • 17 aws-bedrock ids listed by AWS had no cost map row
  • Includes Claude Mythos 5 and 5.1, apac and au inference profiles, and base DeepSeek and Pixtral ids

How it solves it:

  • Adds the 17 rows to both cost map files, identical content
  • Prices come from the AWS price list API or a sibling row, as listed below
  • Bare OpenAI and xAI ids are left to their existing bedrock_mantle rows
  • No existing key is deleted or changed

Pre-Submission checklist

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

  • I have added meaningful tests (data-only change, existing schema and cost map guard tests cover the new rows)
  • 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)

Screenshots / Proof of Fix

Data-only cost map sync, no completion call is made. Rows are added on the strength of the AWS list API and the AWS price list API, with limits from the quoted AWS model cards. Both files verified identical after the edit and python3 -m pytest tests/test_litellm/test_model_prices_schema.py tests/test_litellm/test_cost_map_guard.py -q passes, plus tests/test_litellm/test_utils.py bedrock_mantle lookups, 89 tests

Rows, kind api (15)

Every price field is written exactly as npm run providers -- prices aws-bedrock --region <region> returned it from https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonBedrockFoundationModels/current/index.json, which is the source on each row. Per 1M USD in the API, divided by 1e6. Context window and capability flags come from the named sibling row because the list API only returns id and lifecycle status

key input output cache write cache write 1h cache read flags and context copied from
anthropic.claude-mythos-5-1 10.00 50.00 12.50 20.00 0.25 us.anthropic.claude-fable-5
global.anthropic.claude-mythos-5-1 10.00 50.00 12.50 20.00 0.25 us.anthropic.claude-fable-5
us.anthropic.claude-mythos-5-1 11.00 55.00 13.75 22.00 0.275 us.anthropic.claude-fable-5
us.anthropic.claude-mythos-5 11.00 55.00 13.75 22.00 1.10 us.anthropic.claude-fable-5
apac.anthropic.claude-fable-5 11.00 55.00 13.75 22.00 1.10 us.anthropic.claude-fable-5
au.anthropic.claude-fable-5 11.00 55.00 13.75 22.00 1.10 us.anthropic.claude-fable-5
apac.anthropic.claude-opus-4-7 5.50 27.50 6.875 11.00 0.55 au.anthropic.claude-opus-4-7
apac.anthropic.claude-opus-4-8 5.50 27.50 6.875 11.00 0.55 au.anthropic.claude-opus-4-8
apac.anthropic.claude-opus-5 5.50 27.50 6.875 11.00 0.55 au.anthropic.claude-opus-5
apac.anthropic.claude-opus-5-5 4.40 22.00 5.50 8.80 0.22 au.anthropic.claude-opus-5-5
apac.anthropic.claude-sonnet-4-6 3.30 16.50 4.125 6.60 0.33 au.anthropic.claude-sonnet-4-6
apac.anthropic.claude-sonnet-5 2.20 11.00 2.75 4.40 0.22 au.anthropic.claude-sonnet-5
us.anthropic.claude-mythos-preview 27.50 137.50 34.375 55.00 2.75 anthropic.claude-mythos-preview
apac.anthropic.claude-mythos-preview 27.50 137.50 34.375 55.00 2.75 anthropic.claude-mythos-preview
au.anthropic.claude-mythos-preview 27.50 137.50 34.375 55.00 2.75 anthropic.claude-mythos-preview

The Mythos 5 and 5.1 rows take their context from the AWS model cards, which both state "Context window: 1M tokens" and "Max output tokens: 128K" (https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-anthropic-claude-mythos-5-1.md and model-card-anthropic-claude-mythos-5.md), matching us.anthropic.claude-fable-5. The three mythos-preview rows use litellm_provider: bedrock_converse like every other regional anthropic key, while the existing base anthropic.claude-mythos-preview row stays on bedrock with zero cost. search_context_cost_per_query is not copied from the siblings because the price API does not return it. The three mythos-preview rows carry the API cache prices, so supports_prompt_caching is true on them, unlike the zero-cost base row

Bare OpenAI and xAI ids, resolved as a naming mismatch (5)

The list API emits openai.gpt-6-astra, openai.gpt-5.6-sol, openai.gpt-5.6-terra, openai.gpt-5.6-luna and xai.grok-4.6 as bare ids. The catalog already carries each of them as bedrock_mantle/<id> with the same In-Region prices the AWS model cards state, and get_model_info resolves a bare key before the bedrock_mantle/ fallback, so a bare row would shadow the mantle row for bedrock_mantle/<region>/<id> lookups (CI test test_get_model_info_bedrock_mantle_region_prefix_falls_back_to_the_mantle_row caught this for -sol). No bare rows are added for these five

Rows, kind inherited (2)

The AWS model cards for these two only say "For pricing information, see the Amazon Bedrock Pricing page", and that page renders its numbers from an opaque metered unit map, so no raw source states a plain price for the bare id. Both rows copy the us. sibling, the closest sibling under another region prefix

key inherited_from change from the sibling
deepseek.r1-v1:0 us.deepseek.r1-v1:0 max_output_tokens 8192, from the card "Max output tokens: 8K" (model-card-deepseek-deepseek-r1.md)
mistral.pixtral-large-2502-v1:0 us.mistral.pixtral-large-2502-v1:0 max_output_tokens 16384, from the card "Max output tokens: 16K" (model-card-mistral-ai-pixtral-large.md)

Id mapping

The list API emits bare ids while the price API keys Anthropic models as regional inference profiles and the catalog keys OpenAI and xAI models under bedrock_mantle/. Ids were mapped to those existing key forms. Nothing was treated as a delisting because of a naming difference

Changed pages

The three pages the dispatcher flagged (the metered unit map, the model card index and the price list index) were fetched raw. The price list index is the API the 15 api rows come from and it agrees with every existing aws-bedrock row it covers, so no existing row changed

Delisted by the provider

No deprecation date is stated in the list metadata or on the model cards for these, so nothing was removed or given a deprecation_date. A human decides: ai21.j2-mid-v1, ai21.j2-ultra-v1, amazon.titan-text-express-v1, amazon.titan-text-lite-v1, anthropic.claude-instant-v1, anthropic.claude-mythos-preview, anthropic.claude-v1, cohere.command-light-text-v14, cohere.command-text-v14, meta.llama2-13b-chat-v1, meta.llama2-70b-chat-v1, us.deepseek.v3.2. Regional only: deepseek.v3.2, eu.anthropic.claude-fable-5, eu.anthropic.claude-fable-5-1, eu.deepseek.v3.2, mistral.mistral-large-3-675b-instruct, moonshot.kimi-k2-thinking, moonshotai.kimi-k2.5, qwen.qwen3-coder-next, writer.palmyra-vision-7b, zai.glm-4.7, zai.glm-5 (eu-west-1), jp.anthropic.claude-opus-5, jp.anthropic.claude-sonnet-5 (ap-northeast-1). Coverage gap, not delistings: amazon.titan-image-generator-v1, amazon.titan-image-generator-v2, amazon.titan-embed-g1-text-02, amazon.titan-embed-text-v1, amazon.titan-embed-image-v1 are image and embedding models the text list does not return

Type

🆕 New Feature

Caveats (if any)

Medium

  • Existing bare openai.gpt-6-sol and openai.gpt-6-luna rows on main already shadow their bedrock_mantle rows, left untouched here
  • Mythos 5 and 5.1 capability flags copied from fable-5, not verified per model
  • deepseek.r1-v1:0 and pixtral-large base rows are inherited, not published prices

Low

  • Mythos preview regional rows are bedrock_converse with prompt caching on, while the base key is bedrock with zero cost and caching off

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/c01328421b45481b8d52b619adb26863
Open in Devin Desktop: https://app.devin.ai/desktop/session/c01328421b45481b8d52b619adb26863?variant=devin
Requested by: @kerry-berri


Note

Low Risk
Data-only cost map additions with no runtime logic changes; incorrect prices or flags would affect billing estimates and feature detection for the new model ids only.

Overview
Adds 17 new model rows to model_prices_and_context_window.json and the identical backup file so LiteLLM can price and route AWS Bedrock ids that were missing from the catalog.

The new entries are mostly regional Anthropic inference profiles (Mythos 5/5.1, Fable 5, Opus 4.7–5.5, Sonnet 4.6/5, Mythos preview in us/apac/au/global) with token costs from the AWS price list API and capability/context fields aligned with existing sibling rows. Two base ids (deepseek.r1-v1:0, mistral.pixtral-large-2502-v1:0) are added by inheriting us.* pricing with output limits taken from AWS model cards.

The diff also closes the JSON object for vertex_ai/gemini-2.5-pro-tts before appending the new keys. No existing keys are modified or removed; bare OpenAI/xAI list ids are intentionally omitted to avoid shadowing existing bedrock_mantle/ rows.

Reviewed by Cursor Bugbot for commit 79a30d0. Bugbot is set up for automated code reviews on this repo. Configure here.

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

CLAassistant commented Sep 24, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@kerry-berri

Copy link
Copy Markdown
Contributor

@greptileai

@kerry-berri

Copy link
Copy Markdown
Contributor

bugbot run

@greptile-apps

greptile-apps Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; no actionable regression or repository-rule violation remains.

Summary

Adds 17 AWS Bedrock model metadata and pricing records while removing five intermediate bare OpenAI/xAI records that duplicated and could shadow existing Bedrock Mantle mappings.

  • Adds regional and global Anthropic Claude pricing and capability metadata.
  • Adds base DeepSeek R1 and Mistral Pixtral entries inherited from existing regional records.
  • Keeps the primary and backup model-price maps synchronized.
  • Preserves OpenAI and xAI pricing through the existing bedrock_mantle entries and region-prefix fallback.

Reviews (3) · Last reviewed commit: "fix(bedrock): drop bare OpenAI and xAI k..."

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread model_prices_and_context_window.json Resolved
@codspeed

codspeed Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing litellm_sync_aws-bedrock (79a30d0) with main (80c39a0)

Open in CodSpeed

@codecov

codecov Bot commented Sep 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

…caching

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

Copy link
Copy Markdown
Contributor

@greptileai

@kerry-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

kerry-berri and others added 2 commits September 24, 2026 02:03
…mantle fallback

get_model_info checks the bare split_model before bedrock_mantle/<model>, so the new bare key made bedrock_mantle/us-east-2/openai.gpt-5.6-sol resolve to the bedrock_converse row instead of falling back to bedrock_mantle/openai.gpt-5.6-sol

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

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration devin-ai-integration Bot changed the title feat(bedrock): add 22 aws-bedrock cost map rows from provider sync feat(bedrock): add 17 aws-bedrock cost map rows from provider sync Sep 24, 2026
@kerry-berri

Copy link
Copy Markdown
Contributor

@greptileai

@kerry-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 79a30d0. Configure here.

@kerry-berri kerry-berri left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kerry-berri
kerry-berri merged commit 660e674 into main Sep 24, 2026
99 of 100 checks passed
@kerry-berri
kerry-berri deleted the litellm_sync_aws-bedrock branch September 24, 2026 02:16
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.

2 participants