feat(js/plugins/anthropic): add structured output support#3881
Merged
cabljac merged 44 commits intofirebase:mainfrom Jan 5, 2026
Merged
feat(js/plugins/anthropic): add structured output support#3881cabljac merged 44 commits intofirebase:mainfrom
cabljac merged 44 commits intofirebase:mainfrom
Conversation
cabljac
commented
Dec 4, 2025
a0f3a6d to
a221d21
Compare
…ined params to prevent possible issues
…cting with Anthropic plugin's anthropic sdk version
5976b71 to
5a613e4
Compare
…e/genkit into refactor-anthropic-body
cabljac
commented
Dec 15, 2025
pavelgj
reviewed
Dec 16, 2025
pavelgj
reviewed
Jan 5, 2026
pavelgj
reviewed
Jan 5, 2026
pavelgj
approved these changes
Jan 5, 2026
Co-authored-by: Pavel Jbanov <[email protected]>
cabljac
commented
Jan 5, 2026
cabljac
commented
Jan 5, 2026
aaf1d85 to
6a7f85f
Compare
6a7f85f to
f675575
Compare
hugoaguirre
pushed a commit
that referenced
this pull request
Jan 16, 2026
Co-authored-by: Corie Watson <[email protected]> Co-authored-by: Darren Ackers <[email protected]> Co-authored-by: Pavel Jbanov <[email protected]>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a draft PR to support structured output in the anthropic plugin, to resolve #3854
Notes:
^0.24.3, otherwise the following occurs (because of the installation of the latest version of the Anthropic SDK in the Anthropic plugin):##Features
[x] Structured output support via Anthropic beta API (structured-outputs-2025-11-13)
[x] output_format parameter passed to API for both streaming and non-streaming requests
[x] toAnthropicSchema() function transforms Zod schemas to Anthropic-compatible JSON schemas
[x] isStructuredOutputEnabled() method detects when structured output should be used
[x] Model support: claude-sonnet-4-5, claude-haiku-4-5, claude-opus-4-1, claude-opus-4-5
[x] Comprehensive test suite covering happy path and edge cases
[x] Error handling for invalid configurations
[x] Backward compatible (only activates when constrained: true and format: 'json')