fix(amazon-bedrock): map reasoningConfig to reasoning_effort#11504
Closed
adityaverma9777 wants to merge 1 commit intovercel:mainfrom
Closed
fix(amazon-bedrock): map reasoningConfig to reasoning_effort#11504adityaverma9777 wants to merge 1 commit intovercel:mainfrom
adityaverma9777 wants to merge 1 commit intovercel:mainfrom
Conversation
Author
|
Hi team, thanks for the AI SDK! This is a small, scoped fix aligning the Bedrock provider payload with the AWS API ( Happy to make any adjustments if needed. Thanks for taking a look! |
3 tasks
Collaborator
|
hello - actually the mapping should only take place for OpenAI models and not for others. i'm closing this PR and it will be continued in #11620 |
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
The Amazon Bedrock provider currently sends
reasoningConfig/maxReasoningEffort(camelCase) in the request payload when configuring reasoning effort for non-Anthropic models (e.g. Nova). However, the AWS Bedrock API expects these fields in snake_case (reasoning_effort/max_reasoning_effort).This mismatch can lead to request validation errors or the configuration being ignored at runtime.
Summary
This PR fixes the internal request mapping in the Amazon Bedrock provider so that:
reasoningConfig,maxReasoningEffort)reasoning_effortandmax_reasoning_effortManual Verification
Manually verified by:
reasoning_effort.max_reasoning_effortis sentreasoningConfigdoes not appear anywhere in the final request bodyAutomated provider-level tests were updated to cover this behavior.
Checklist
pnpm changesetin the project root)Related Issues
fixes #11467