Backport: feat(bedrock): add support for service tier for model inference#14024
Merged
vercel-ai-sdk[bot] merged 1 commit intorelease-v6.0from Apr 1, 2026
Merged
Conversation
## Background https://docs.aws.amazon.com/bedrock/latest/userguide/service-tiers-inference.html `@ai-sdk/amazon-bedrock` was missing request-side support for Bedrock inference service tiers, despite Amazon Bedrock supporting them natively for `Converse` / `ConverseStream` requests. This created a feature gap relative to other AI SDK providers such as Groq, which already expose request-level service tier controls. Without this, Bedrock users could observe service tier information in provider metadata, but could not select a tier through `providerOptions`, even though the underlying Bedrock API supports it. ## Summary This PR adds request-level Bedrock service tier support via `providerOptions.bedrock.serviceTier`. Changes included: - Added `serviceTier` to `AmazonBedrockLanguageModelOptions` - Validated supported values: `reserved`, `priority`, `default`, `flex` - Serialized the option into Bedrock request bodies as top-level `serviceTier: { type: ... }` - Added generate and stream tests covering request serialization - Added schema tests for accepted and rejected values - Updated the Bedrock provider docs with a usage example - Added a patch changeset for `@ai-sdk/amazon-bedrock` ## Manual Verification Manually verified by exercising both `doGenerate` and `doStream` request construction in the Bedrock provider tests and confirming the outgoing request body includes: ```ts serviceTier: { type: 'priority', } ``` Also verified that: - the value is sent as a top-level Bedrock request field, not under `additionalModelRequestFields` - invalid values are rejected by provider option validation - existing request behavior remains unchanged when `serviceTier` is omitted ## Checklist - [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) ## Related Issues Fixes #13241 --------- Co-authored-by: Aayush Kapoor <83492835+aayush-kapoor@users.noreply.github.com> Co-authored-by: Aayush Kapoor <aayushkapoor34@gmail.com>
4 tasks
aayush-kapoor
approved these changes
Apr 1, 2026
Contributor
Author
|
🚀 Published in:
|
Contributor
Author
|
🚀 Published in:
|
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.
This is an automated backport of #13242 to the release-v6.0 branch. FYI @heiwen