feat(anthropic, amazon-bedrock): v5 expose anthropicBeta to downstream providers#13059
Merged
sylviezhang37 merged 5 commits intorelease-v5.0from Mar 4, 2026
Merged
Conversation
packages/amazon-bedrock/src/anthropic/bedrock-anthropic-provider.test.ts
Outdated
Show resolved
Hide resolved
4 tasks
dancer
approved these changes
Mar 4, 2026
sylviezhang37
added a commit
that referenced
this pull request
Mar 4, 2026
…roviders (#13066) <!-- Welcome to contributing to AI SDK! We're excited to see your changes. We suggest you read the following contributing guide we've created before submitting: https://github.com/vercel/ai/blob/main/CONTRIBUTING.md --> ## Background <!-- Why was this change necessary? --> `amazon-bedrock/anthropic` requires `anthropic_beta` in its request body to enable extended capabilities for anthropic models, like 1M context (context-1m-2025-08-07) and fine-grained tool streaming (fine-grained-tool-streaming-2025-05-14). ## Summary <!-- What did you change? --> - `anthropic`: added `anthropicBeta` and forwarded to downstream providers via transformRequestBody - `amazon-bedrock`: receive betas passed from upstream - `v5` changes here: #13059 ## Manual Verification <!-- For features & bugfixes. Please explain how you *manually* verified that the change works end-to-end as expected (excluding automated tests). Remove the section if it's not needed (e.g. for docs). --> - added example scripts with verification checks ## Checklist <!-- Do not edit this list. Leave items unchecked that don't apply. If you need to track subtasks, create a new "## Tasks" section Please check if the PR fulfills the following requirements: --> - [x] Tests have been added / updated (for bug fixes / features) - [x] Documentation has been added / updated (for bug fixes / features) - [x] A _patch_ changeset for relevant packages has been added (for bug fixes / features - run `pnpm changeset` in the project root) - [x] I have reviewed this pull request (self-review)
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.
Background
amazon-bedrock/anthropicrequiresanthropic_betain its request body to enable extended capabilities for anthropic models, like 1M context (context-1m-2025-08-07) and fine-grained tool streaming (fine-grained-tool-streaming-2025-05-14).Summary
anthropic: addedanthropicBetaand forwarded to downstream providers via transformRequestBodyamazon-bedrock: receive betas passed from upstreamI also explored handling this gap in
amazon-bedrockinstead (see this draft PR if you're curious). Ultimately I think this is the cleanest solution. If we want to allow bothanthropicandbedrocknamespaces, we can handle this on the Gateway / client side via better education.Manual Verification
Checklist
pnpm changesetin the project root)Future Work
Related Issues