[Enhancement] Activate Structured Outputs for Anthropic models
Author: iwr-redmondCreated Dec 21, 2025Updated Dec 25, 2025
Labelsenhancement
Motivation
The Anthropic NLP adapter currently does not use structured outputs, which may result in errors during inference. Anthropic offers a beta-quality structured outputs feature, which requires models to adhere to provided Pydantic models and is more reliable.
Solution Proposal
Modify the Anthropic NLP adapter to use Structured Outputs instead of standard prompts as described here. To activate this feature during inference, a beta header will also be required.
Discussion
This FR is paired with #678, which would provide the same constrained sampling feature for user-provided open weights models.
Source: emcie-co/parlant