SIGN IN SIGN UP

fix: honor Anthropic disableParallelToolUse for Amazon Bedrock models (#19560)

## Background

Amazon Bedrock silently ignored
providerOptions.anthropic.disableParallelToolUse, allowing Anthropic
models to emit multiple tool calls despite callers requesting serialized
tool use.

## Root Cause

The Bedrock chat model parsed only amazonBedrock and legacy bedrock
provider options, so disableParallelToolUse under anthropic never
reached request construction; captured requests confirmed the field was
absent while the control request serialized tool calls.

## Summary

Parsed disableParallelToolUse from Anthropic provider options and
emitted the Anthropic tool_choice field through
additionalModelRequestFields while suppressing the conflicting
Bedrock-native tool choice. Added a patch changeset.

## Testing

Added tool-preparation and request-level regression coverage for
default, auto, required, and named tool choices, including conflict
prevention.

## End-to-end Validation

- `pnpm -C examples/ai-functions exec tsx
src/reproduction/issue-17267.ts` exited successfully with the original
replay artifacts, confirming serialized tool use without conflicting
tool-choice fields.

## Related Issues

Fixes #17267

Closes #19531

---------

Co-authored-by: ai-sdk-factory <308175966+ai-sdk-factory@users.noreply.github.com>
Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>
Co-authored-by: sagar448 <20596140+sagar448@users.noreply.github.com>
A
ai-sdk-factory[bot] committed
9921a2fde210eb25c9a7f3d200f4646f77724c0f
Parent: e1a9e50
Committed by GitHub <noreply@github.com> on 8/26/2026, 6:30:47 PM