You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
v4 extension: act/observe/extract fail on Claude Opus 5.5 (bundled @ai-sdk/anthropic predates the model) #3337
On Stagehand v4 (4.2.1 and 4.3.0), every act, observe and extract call fails when the model is anthropic/claude-opus-5-5:
tool_choice: type "tool" and "any" are not supported for this model.
These primitives run inside the extension's service worker (dist/assets/stagehand-extension.zip), which bundles @ai-sdk/anthropic. The bundled provider's getModelCapabilities doesn't recognize claude-opus-5 or claude-opus-5-5, so the model falls through to the unknown-model row (supportsStructuredOutput: false, maxOutputTokens: 4096). With structuredOutputMode: "auto" that means a forced JSON tool call, which Opus 5.5 rejects.
Reproduction
Clean project with only @browserbasehq/[email protected] and zod installed:
Bump @ai-sdk/anthropic for the extension. It recognizes Opus 5.5 from 4.0.60 (published 2026-09-22); main locks 4.0.8. With the newer provider, structuredOutputMode: "auto" resolves to native structured output, the same way #2231 fixed Fable 5 with no code changes to the primitives. #3132 fixed the related forced done tool call for Opus 5.5 on v3.
Workaround
A postinstall script that adds claude-opus-5 to the Opus 4.8 capability row in the bundled worker, both inside stagehand-extension.zip and in dist/extension/service-worker.js. Since v4's model config only accepts modelName, apiKey and headers, there's no supported way to pass structuredOutputMode: "outputFormat" instead.
Activity
[fix]: bump ai-sdk for opus 5.5 support (browserbase#3340)