fix(provider): split Bedrock 1M context models into explicit 200K and 1M variants#13324
fix(provider): split Bedrock 1M context models into explicit 200K and 1M variants#13324karlkurzer wants to merge 6 commits intoanomalyco:devfrom
Conversation
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate FoundPR #13200: "fix(provider): split Bedrock Opus 4.6 into 200K and 1M variants" Why it's related: This PR appears to be addressing the same issue as PR #13324 — splitting Bedrock Claude models (Opus 4.6 and potentially Sonnet 4.5) into separate 200K and 1M context variants. PR #13200 seems to be the earlier/related work that may have been expanded or revised in PR #13324. Both PRs reference the same underlying issue (#13199) of Bedrock's 200K hard limit requiring the |
|
@karlkurzer When can we expect a release with this fix? Thanks! |
|
@xeaser I am just contributing, not maintaining, so not sure, when/if it will be merged, but given the speed of development on OC, I guess it should not be too long. In the meantime, feel free to checkout my branch :-) |
|
@karlkurzer Oh I thought you're a maintainer. |
… 1M variants Bedrock Claude Opus 4.6 and Sonnet 4.5 support 1M token context, but only when the anthropic_beta flag context-1m-2025-08-07 is sent in the request body. Without it, Bedrock enforces a 200K hard limit. Split these models at models.dev ingestion time into a safe 200K default and an opt-in 1M Experimental variant that sends the required beta flag via the AI SDK anthropicBeta provider option. Custom user-configured models are not affected. Closes anomalyco#13199
|
+1 on experiencing this issue and thinking this PR is likely a good fix |
6c1adbd to
7dce8e7
Compare
Sonnet 4.6 (anthropic.claude-sonnet-4-6) also supports 1M context on Bedrock with the same anthropic_beta flag. Add it to the allowlist so it gets split into 200K default and 1M Experimental variants.
|
Added support for Sonnet 4.6, FYI |
|
@adamdotdevin could we perhaps get this reviewed 🙏? Thank you so much for your work on the project! |
|
did you add opus? |
Summary
200K(default) and1M Experimentalvariants at models.dev ingestion timeanthropicBeta: ["context-1m-2025-08-07"]flagvia the AI SDK provider options, which Bedrock requires to unlock the 1M context window
requests above 200K tokens
Why
Bedrock enforces a 200K token hard limit on Claude Opus 4.6, Sonnet 4.5, and Sonnet 4.6 unless the
anthropic_beta: ["context-1m-2025-08-07"]flag is included in the request body (AWS docs).Testing
bun test test/provider/provider.test.ts— 74 tests pass (6 new)bun run typecheck— cleanCloses #13199