[fix]: bump ai-sdk for opus 5.5 support
Merged
AK
3h ago+111+111+012345678901234567890123456789-65-65-01234567890123456789
why
Fixes https://github.com/browserbase/stagehand/issues/3337
The extension used @ai-sdk/anthropic 4.0.8 which predates opus 5.5. For structured output, it sent a forced tool call (tool_choice: { type: "any" }), which opus 5.5 rejected. Because of this, act, observe and extract were also failing.
what changed
- Bump
@ai-sdk/anthropicto ^4.0.90. This version uses native structured output for Opus 5.5. - Bump
aito ^7.0.155. It must use the same@ai-sdk/providerversion as the new Anthropic package. - Pin
@ai-sdk/anthropicto 4.0.26 in mastra-sdk to match the@ai-sdk/providerversion that@mastra/coreuses
test plan
- Added a gateway test fixture to catch when tool choice is required but the reply has no tool call
Summary by cubic
Bumps @ai-sdk/anthropic and ai in the extension so it works with Claude Opus 5.5, fixing act, observe, and extract failures for that model.
- Fixes #3337, where forced tool calls (
tool_choice: { type: "any" }) were rejected by Opus 5.5. - Updates the mastra-sdk
NativeMastraModeltype to accept both OpenAI and Anthropic models, since providers can use different@ai-sdk/providerversions. - Adds a gateway test fixture to catch when tool choice is required but the reply has no tool call.