Repository navigation
fix(bedrock): add missing AWS GovCloud prices and correct drifted GovCloud rows - #50077
kerry-berri wants to merge 2 commits into
Conversation
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
bugbot run |
There was a problem hiding this comment.
✅ 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 1f77174. Configure here.
[Medium impact] The changes affect cost estimates for a defined set of Bedrock models in two GovCloud regions. Fix the Grok route lookup and provide the required live billing proof before merging FindingsSummaryAdds 16 GovCloud model rows and corrects four existing price rows in both catalog copies
Reviews (1) · Last reviewed commit: "Add missing AWS GovCloud Bedrock prices ..." · Reviewed by Greptile |
| "cache_read_input_token_cost_priority": 1.155e-06, | ||
| "input_cost_per_token_batches": 1.32e-06, | ||
| "output_cost_per_token_batches": 3.96e-06, | ||
| "use_openai_responses_path": true, |
There was a problem hiding this comment.
The new regional Grok rows declare use_openai_responses_path, but mantle_base_segment and mantle_supports_responses read only the missing bedrock_mantle/xai.grok-4.7 row. Default calls therefore use /v1 instead of /openai/v1, and Responses calls use chat emulation. Make the helpers read regional rows or add the shared row they require
Knowledge Base Used: Provider adapters and capabilities
| "input_cost_per_token": 3.96e-06, | ||
| "output_cost_per_token": 1.98e-05, |
There was a problem hiding this comment.
These rows change billing, so AGENTS.md requires live before-and-after requests through a proxy. The description reports only direct cost lookups. Before merging, add proxy requests and spend results at the base and 1f771743e56336f828e8bbbb6f30960e8584f9b7
Context Used: AGENTS.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Merging this PR will not alter performance1 warning
Comparing |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
|
|
Rolled into #50082 after re-checking each value against the official provider source. Closing this one as superseded, thanks for the work |
Handwritten 1-3 sentence description
Add some govcloud prices
Details
TLDR
Problem this solves:
How it solves it:
User Flow
Before: a GovCloud user calling Kimi K3 through Bedrock Mantle sees spend about 17% below their AWS bill
model: bedrock_mantle/us-gov-east-1/moonshotai.kimi-k3After: the same request is logged at the price AWS charges in GovCloud
Pre-Submission checklist
uv run pytest tests/unit/<your_test_file>.py -vScreenshots / Proof of Fix
Prices come from https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonBedrock/current/us-gov-west-1/index.json, the matching us-gov-east-1 file, and the AmazonBedrockFoundationModels files for Claude, read on 2026-11-04. Each new and fixed row was compared against the standard tier in those files
No GovCloud AWS credentials were available, so the proof is the cost lookup a request goes through, run at the merge base and the tip with
litellm.cost_per_tokenfor 1M input and 1M output tokensBefore (df78b16)
After (5ec4c43)
tests/unit/test_cost_map_guard.pyandtests/unit/test_utils.py::test_aaamodel_prices_and_context_window_json_is_validpass (66 passed). Both JSON files are byte-identicalType
🐛 Bug Fix
Caveats (if any)
Medium
bedrock_mantle/us-gov-*/xai.grok-4.7rows. The AWS Grok 4.7 model card lists it only on bedrock-runtime throughus.xai.grok-4.7andglobal.xai.grok-4.7, even though the price file names the usage type-mantle-us.xai.grok-4.7are not priced at the GovCloud rate ($2.64 / $7.92) by this PR/v1/chat/completionslike other Mantle rowsLow
Link to Devin session: https://app.devin.ai/sessions/070329effd864e6b902131183ea41afb
Open in Devin Desktop: https://app.devin.ai/desktop/session/070329effd864e6b902131183ea41afb?variant=devin
Requested by: @kerry-berri