First of all, thank you for maintaining this awesome library!
I'm using the Anthropic provider with Active Agent.
Currently, structured output for the Anthropic provider appears to be implemented using the prompt engineering technique with prefilled responses.
However, starting with Claude Sonnet 4.5/4.6, prefilled responses are no longer supported, and requests using this approach now return a 400 error.
Reference:
https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#migrating-away-from-prefilled-responses
Problem
As a result, structured output does not work with the latest Claude models.
Proposal
It would be great to support Anthropic's current structured output approach instead of relying on prefilled responses.
I've already prepared a PR with a proposed implementation. If this direction looks good, I'd really appreciate your feedback.
PR: #339
First of all, thank you for maintaining this awesome library!
I'm using the Anthropic provider with Active Agent.
Currently, structured output for the Anthropic provider appears to be implemented using the prompt engineering technique with prefilled responses.
However, starting with Claude Sonnet 4.5/4.6, prefilled responses are no longer supported, and requests using this approach now return a 400 error.
Reference:
https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#migrating-away-from-prefilled-responses
Problem
As a result, structured output does not work with the latest Claude models.
Proposal
It would be great to support Anthropic's current structured output approach instead of relying on prefilled responses.
I've already prepared a PR with a proposed implementation. If this direction looks good, I'd really appreciate your feedback.
PR: #339