provider: split Bedrock Claude into 200K and 1M catalog entries#25186
Closed
jackmazac wants to merge 1 commit intoanomalyco:devfrom
Closed
provider: split Bedrock Claude into 200K and 1M catalog entries#25186jackmazac wants to merge 1 commit intoanomalyco:devfrom
jackmazac wants to merge 1 commit intoanomalyco:devfrom
Conversation
splitBedrock1m duplicates supported Opus/Sonnet rows with -1m suffix, 200K default without anthropicBeta, 1M row with context-1m beta except native Opus 4.7 which keeps existing betas.
Contributor
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
Contributor
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
Author
|
Closing to reopen with a linked issue and the repo PR template per CONTRIBUTING. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Amazon Bedrock exposes several Claude models that can use a very large context window, but only when you opt in with the right headers and product choice. Today those models often appear as a single option, which makes it easy to pick the wrong one or miss the beta header entirely. This change splits each supported Bedrock Claude model into a clear 200K default and a separate 1M variant so people can choose deliberately.
Problem (plain language)
Users want either “normal” long context or the experimental million-token mode. When both behaviors share one catalog entry, the app cannot label limits honestly, and the wrong beta flag may be attached—or omitted—so requests fail or behave unexpectedly. Native 1M support on newer models must not be forced through the older beta path.
Technical breakdown
fromModelsDevProvider.context-1m-2025-08-07, while the same logical model should still be available at 200K without that beta.anthropicBetafrom upstream data instead of injecting the 1M beta on the 1M row.Solution
splitBedrock1mfor provider idamazon-bedrock: for matchingmodel.api.idsubstrings, clone into a-1mmodel id.anthropicBetafrom options, normalize display name to(200K).-1mrow: 1M context; merge beta array—native Opus 4.7 keeps existing betas only; others add the 1M beta when missing.Files
packages/opencode/src/provider/provider.tsHow to test
From
packages/opencode:Manual: open model picker for Bedrock and confirm paired (200K) / (1M) entries for supported Claude ids.
Merge order
Independent of PR #25184 and PR #25185. Recommended before or with any Bedrock transform follow-up that assumes distinct
-1mids.