Clear Bedrock Claude rows the pricing page dropped #781 (GitHub #780)
main from775-amazon-bedrock-pricing-lost-parser-miss-for-claude-rows-sinc·merged by tombeckenham View on GitHubFixes #775
Claude Sonnet 4 (anthropic.claude-sonnet-4-20250514-v1:0) and Claude 3 Haiku (anthropic.claude-3-haiku-20240307-v1:0) are EOL. The Bedrock pricing page no longer has a standard token row for either name. Claude 3 Haiku survives only in an evaluation example. The us-east-1 offer has an input-only leftover for Haiku and nothing for Sonnet 4, so there is no complete rate. The legacy lifecycle page names public extended access and publishes no price.
The poll was keeping the stored cards and logging pricing_lost / parser_miss. An Anthropic chat model is now cleared when the Claude tables parsed and do not name it. A name the table still lists, whose meter does not resolve (DeepSeek-R1), stays a parser miss. If the Claude tables fail to parse, nothing is cleared.
Tests#
bedrock-pricing.test.ts: a resolved Claude row is priced, an unresolved meter is remembered, example prose is notamazon-bedrock.test.ts: Sonnet 4 and Claude 3 Haiku are cleared; a still-named unresolved row is not
Summary by CodeRabbit#
- Bug Fixes
- Improved Anthropic model pricing on Amazon Bedrock: models still named in the pricing table remain listed even when their rates cannot be read, with pricing shown as unavailable.
- Pricing is cleared for models no longer named in the table, preventing outdated rates from appearing.
- Pricing recognition now distinguishes actual model entries from example text and differently versioned model names.
- 1
tombeckenham linked this to fix #775
Walkthrough
-
The Bedrock pricing parser now tracks model names found in standard pricing tables, including rows with unreadable rates. Bedrock model listing uses those names to distinguish absent Claude chat models from listed models whose prices do not resolve.
Changes: Bedrock Claude pricing
Layer / File(s) Summary Collect pricing-page model names
src/server/providers/bedrock-pricing.ts,src/server/providers/bedrock-pricing.test.tsBedrockPriceBooknow carries normalized model names found in standard pricing tables. The parser records names even when rates do not resolve, and tests cover listed and non-table names.Clear pricing for absent Claude models
src/server/providers/bedrock-cards.ts,src/server/providers/adapters/amazon-bedrock.test.tsWhen the pricing page lists Claude names but omits an Anthropic Claude chat model’s name, listing marks that model’s pricing as cleared. Tests distinguish absent models from listed models with unreadable prices. Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix · Severity of issue fixed: Medium
Merge Risk:
Moderate · up to6830e-
The change clears Bedrock Claude pricing for models the pricing page no longer lists. If a still-listed Claude model sits in a table whose headers the parser does not recognize, its stored price could be cleared wrongly. The trigger depends on the live page's table headers, so this should be resolved or explicitly accepted before merge.
Pre-merge checks:
2-
Check name Status Explanation Description Check Check skipped - CodeRabbit’s high-level summary is enabled. Title check The title "Clear Bedrock Claude rows the pricing page dropped" matches the main change. The PR clears Bedrock Claude pricing rows (Sonnet 4, Claude 3 Haiku) when the pricing page no longer lists those… Full details: Title check
-
Explanation
The title "Clear Bedrock Claude rows the pricing page dropped" matches the main change. The PR clears Bedrock Claude pricing rows (Sonnet 4, Claude 3 Haiku) when the pricing page no longer lists those models. The title is specific and concise, and it does not describe anything absent from the changeset. The title does not name the guard that keeps unresolved listed models as parser misses, but it does not need to cover every detail.
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
-
tombeckenham merged this0001faa
tombeckenham closed this
Sign in to join this conversation.
⚠️ No Changeset found#
Latest commit: 6830eb69b0f4a55d85bc5b3e44710a135d86e3ec
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR