Skip to content

chore(models): set bedrock Claude discount to 10% - #2464

Closed
steebchen wants to merge 2 commits into
mainfrom
chore/bedrock-discount-10
Closed

steebchen wants to merge 2 commits into
mainfrom
chore/bedrock-discount-10

Conversation

@steebchen

@steebchen steebchen commented May 31, 2026 •

Copy link
Copy Markdown
Member

Summary

Sets the discount for all AWS Bedrock Claude model mappings to 10% (discount: "0.1"), down from the previous 20%.

Changes

  • Updated all 14 aws-bedrock Claude mappings in packages/models/src/models/anthropic.ts from discount: "0.2" to discount: "0.1".

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores

    • Updated AWS Bedrock discount rates for multiple Claude model variants (Sonnet, Haiku, Opus and dated releases), reducing the discount from 20% to 10%.
  • Tests

    • Adjusted cost tests to derive and verify discount values from the model registry at runtime instead of using a fixed value.

Copilot AI review requested due to automatic review settings May 31, 2026 14:00
@coderabbitai

coderabbitai Bot commented May 31, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

Walkthrough

The aws-bedrock provider discount was changed from "0.2" to "0.1" across 14 Claude model entries in packages/models/src/models/anthropic.ts. The Bedrock Claude cache-write test in apps/gateway/src/lib/costs.spec.ts was updated to derive the discount from the models registry and assert against that dynamic value.

Changes

AWS Bedrock Discount Rate Adjustment

Layer / File(s) Summary
Discount rate updates across Claude models
packages/models/src/models/anthropic.ts
The discount field for aws-bedrock provider entries is reduced from "0.2" to "0.1" across 14 Claude model definitions (claude-3-7-sonnet, claude-3-5-haiku variants, claude-sonnet-4 variants, claude-haiku-4-5 variants, and claude-opus-4 variants).
Bedrock Claude cost test reads registry discount
apps/gateway/src/lib/costs.spec.ts
The AWS Bedrock Claude cache-write test now reads the aws-bedrock provider discount from the models registry, converts it to a number to compute the discount multiplier, and asserts result.discount against that derived value instead of a hardcoded multiplier.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • theopenco/llmgateway#2175: Both PRs modify packages/models/src/models/anthropic.ts aws-bedrock provider discount values and update Bedrock-related cost tests.
  • theopenco/llmgateway#2193: Touches AWS Bedrock/Anthropic pricing and billing logic, including cost test expectations linked to anthropic.ts provider pricing.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore(models): set bedrock Claude discount to 10%' directly and accurately summarizes the main change: updating AWS Bedrock Claude model discounts from 20% to 10%.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/bedrock-discount-10

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates AWS Bedrock Claude model catalog pricing metadata so the hardcoded Bedrock discount is reduced from 20% to 10%.

Changes:

  • Changed all AWS Bedrock Claude provider mappings in anthropic.ts from discount: "0.2" to discount: "0.1".
  • Applies uniformly across current and deprecated Claude Bedrock mappings.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

minCacheableTokens: 4096,
requestPrice: "0",
discount: "0.2",
discount: "0.1",
@steebchen steebchen closed this May 31, 2026
@steebchen
steebchen deleted the chore/bedrock-discount-10 branch May 31, 2026 14:15
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