Skip to content

Commit a500de1

Browse files
authored
remove strictJson schema (#2028)
# why Structured output mode is deprecated # what changed removed usage of anthropic structured output mode # test plan Ran tests locally + CI tests <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Removed the deprecated `anthropic.structuredOutputMode` option from AISdk provider options to align with Anthropic’s deprecation and avoid sending unsupported flags. Updated unit tests and added a changeset; behavior for other providers is unchanged. <sup>Written for commit 64daca7. Summary will update on new commits. <a href="https://cubic.dev/pr/browserbase/stagehand/pull/2028">Review in cubic</a></sup> <!-- End of auto-generated description by cubic. -->
1 parent 21ba2de commit a500de1

3 files changed

Lines changed: 5 additions & 9 deletions

File tree

.changeset/twelve-corners-sell.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@browserbasehq/stagehand": patch
3+
---
4+
5+
Remove deprecated provider option

packages/core/lib/v3/llm/aisdk.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,6 @@ export class AISdkClient extends LLMClient {
194194
structuredOutputs: true,
195195
};
196196
break;
197-
case "anthropic":
198-
providerOptions.anthropic = {
199-
structuredOutputMode: "auto",
200-
};
201-
break;
202197
case "groq":
203198
providerOptions.groq = {
204199
structuredOutputs: true,

packages/core/tests/unit/aisdk-clients.test.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,6 @@ describe("AISdkClient structured output provider options", () => {
4141
["azure/gpt-4.1", { azure: { strictJsonSchema: true } }],
4242
["google/gemini-2.5-pro", { google: { structuredOutputs: true } }],
4343
["vertex/gemini-2.5-pro", { vertex: { structuredOutputs: true } }],
44-
[
45-
"anthropic/claude-sonnet-4-20250514",
46-
{ anthropic: { structuredOutputMode: "auto" } },
47-
],
4844
["groq/llama-3.3-70b-versatile", { groq: { structuredOutputs: true } }],
4945
["cerebras/llama-4-scout", { cerebras: { strictJsonSchema: true } }],
5046
[

0 commit comments

Comments
 (0)