Skip to content

feat(anthropic, amazon-bedrock): v5 expose anthropicBeta to downstream providers#13059

Merged
sylviezhang37 merged 5 commits intorelease-v5.0from
share-anthropic-beta-downstream-providers
Mar 4, 2026
Merged

feat(anthropic, amazon-bedrock): v5 expose anthropicBeta to downstream providers#13059
sylviezhang37 merged 5 commits intorelease-v5.0from
share-anthropic-beta-downstream-providers

Conversation

@sylviezhang37
Copy link
Copy Markdown
Contributor

@sylviezhang37 sylviezhang37 commented Mar 4, 2026

Background

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

  • anthropic: added anthropicBeta and forwarded to downstream providers via transformRequestBody
  • amazon-bedrock: receive betas passed from upstream

I also explored handling this gap in amazon-bedrock instead (see this draft PR if you're curious). Ultimately I think this is the cleanest solution. If we want to allow both anthropic and bedrock namespaces, we can handle this on the Gateway / client side via better education.

Manual Verification

  • added example scripts

Checklist

  • Tests have been added / updated (for bug fixes / features)
  • Documentation has been added / updated (for bug fixes / features)
  • A patch changeset for relevant packages has been added (for bug fixes / features - run pnpm changeset in the project root)
  • I have reviewed this pull request (self-review)

Future Work

  • Make these changes in v6 too

Related Issues

@tigent tigent bot added ai/provider related to a provider package. Must be assigned together with at least one `provider/*` label documentation Improvements or additions to documentation feature New feature or request maintenance CI, internal documentation, automations, etc provider/amazon-bedrock Issues related to the @ai-sdk/amazon-bedrock provider provider/anthropic Issues related to the @ai-sdk/anthropic provider labels Mar 4, 2026
@sylviezhang37 sylviezhang37 changed the base branch from main to release-v5.0 March 4, 2026 20:00
@sylviezhang37 sylviezhang37 marked this pull request as ready for review March 4, 2026 20:03
@sylviezhang37 sylviezhang37 changed the title feat(anthropic, amazon-bedrock): expose anthropicBeta to downstream providers feat(anthropic, amazon-bedrock): v5 expose anthropicBeta to downstream providers Mar 4, 2026
@sylviezhang37 sylviezhang37 merged commit 63bf188 into release-v5.0 Mar 4, 2026
19 checks passed
@sylviezhang37 sylviezhang37 deleted the share-anthropic-beta-downstream-providers branch March 4, 2026 22:17
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai/provider related to a provider package. Must be assigned together with at least one `provider/*` label documentation Improvements or additions to documentation feature New feature or request maintenance CI, internal documentation, automations, etc provider/amazon-bedrock Issues related to the @ai-sdk/amazon-bedrock provider provider/anthropic Issues related to the @ai-sdk/anthropic provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants