ai
ai copied to clipboard
docs: correct Amazon Bedrock reasoning provider option example
Background
The docs detail that to enable reasoning for models in Amazon Bedrock, you should set the reasoning_config provider option. However, in the code snippit, the provider option is in camelCase:
const { text, reasoning, reasoningDetails } = await generateText({
model: bedrock('us.anthropic.claude-3-7-sonnet-20250219-v1:0'),
prompt: 'How many people will live in the world in 2040?',
providerOptions: {
bedrock: {
// before (does not work): reasoningConfig: { type: 'enabled', budgetTokens: 1024 },
reasoning_config: { type: 'enabled', budgetTokens: 1024 }, // works
},
},
});
Summary
I corrected the code example to use the snake_case casing convention, and confirmed that it worked.
Tasks
- [x] Tests for the changes have been added (for bug fixes / features)
- [x] Docs have been added / updated (for bug fixes / features)
- [x] If required, a patch changeset for relevant packages has been added
- [x] You've run
pnpm prettier-fixto fix any formatting issues
Future Work
None
This should be fixed in the provider instead (bug).
@lgrammel: This should be fixed in the provider instead (bug).
fixed, and PR updated! 🙃