Skip to content

Conversation

@cabljac
Copy link
Contributor

@cabljac cabljac commented Dec 2, 2025

This is a draft PR to support structured output in the anthropic plugin, to resolve #3854

Notes:

  • Introduces overrides to force the VertexAI plugin to use ^0.24.3, otherwise the following occurs (because of the installation of the latest version of the Anthropic SDK in the Anthropic plugin):
    image

##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')

@cabljac cabljac changed the title Add structured output 2 Dec 3, 2025
@CorieW CorieW force-pushed the add-structured-output-2 branch from a0f3a6d to a221d21 Compare December 8, 2025 13:42
@CorieW CorieW force-pushed the add-structured-output-2 branch from 5976b71 to 5a613e4 Compare December 10, 2025 19:20
@cabljac cabljac marked this pull request as ready for review December 16, 2025 13:46
@cabljac cabljac requested review from ifielker and pavelgj December 16, 2025 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

4 participants