Skip to main content
ELI5: declare the shape you want per stage; the harness picks each provider’s native structured-output mechanism (Anthropic output_format: json_schema, Gemini structured output, OpenAI structured responses) and validates the result. You never write provider-specific JSON-mode flags.

Where it lives: per-stage output_schema

There is deliberately no top-level structured_output field. Structure belongs to stages — a stage that produces data declares its shape:
The extract stage must emit JSON matching this schema; the next stage receives it as typed input. Supported type values: object, array, string, number, boolean, with recursive properties/items and required.

Provider support

Implemented and probed on Anthropic (output_format {type: json_schema} and strict JSON mode), Gemini (structured output), and the OpenAI Responses path. Local models honor the shape on a best-effort basis — validate downstream if your local model matters.

When to use

See also