Skip to content

fix(amazon-bedrock): send reasoning_effort instead of reasoningConfig for non-Anthropic models#11508

Closed
Faizanq wants to merge 4 commits intovercel:mainfrom
Faizanq:fix/bedrock-reasoning-effort-snake-case
Closed

fix(amazon-bedrock): send reasoning_effort instead of reasoningConfig for non-Anthropic models#11508
Faizanq wants to merge 4 commits intovercel:mainfrom
Faizanq:fix/bedrock-reasoning-effort-snake-case

Conversation

@Faizanq
Copy link
Copy Markdown

@Faizanq Faizanq commented Jan 4, 2026

Summary

Fixes the parameter naming bug where SDK sends reasoningConfig (camelCase nested object) but AWS Bedrock expects reasoning_effort (snake_case flat value) for non-Anthropic models.

Before: additionalModelRequestFields: { reasoningConfig: { maxReasoningEffort: 'medium' } }
After: additionalModelRequestFields: { reasoning_effort: 'medium' }

Changes

  • Changed the request payload for non-Anthropic models to use reasoning_effort instead of reasoningConfig
  • Updated corresponding test to verify the new payload format

Test Plan

  • All existing unit tests pass (209 tests)
  • Updated test verifies reasoning_effort is sent correctly
  • Test confirms reasoningConfig is no longer sent

Fixes #11467

… for non-Anthropic models

AWS Bedrock expects `reasoning_effort: 'medium'` (snake_case) but SDK was
sending `reasoningConfig: { maxReasoningEffort: 'medium' }` (camelCase nested).

Fixes vercel#11467
@vercel-ai-sdk vercel-ai-sdk bot added ai/provider related to a provider package. Must be assigned together with at least one `provider/*` label provider/amazon-bedrock Issues related to the @ai-sdk/amazon-bedrock provider labels Jan 4, 2026
@Faizanq Faizanq force-pushed the fix/bedrock-reasoning-effort-snake-case branch from fca2762 to 5963044 Compare January 4, 2026 09:38
@aayush-kapoor
Copy link
Copy Markdown
Collaborator

marking this as closed since it's a duplicate of PR #11504 - please track that pr for updates

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 provider/amazon-bedrock Issues related to the @ai-sdk/amazon-bedrock provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: @ai-sdk/amazon-bedrock sends 'reasoningConfig' (camelCase) but AWS Bedrock expects 'reasoning_effort' (snake_case)

2 participants