Interface StructuredOutputMeta

interface StructuredOutputMeta {
    schemaName: string;
    valid: boolean;
    attempts: number;
    enforcement: "forced_tool" | "provider_schema" | "prompt_only";
    stage: "model" | "post_guardrail";
    issues?: string[];
}

Properties

schemaName: string
valid: boolean
attempts: number

Model calls the turn made for the structured reply.

enforcement: "forced_tool" | "provider_schema" | "prompt_only"

How the schema reached the model: forced_tool, a forced schema tool call the gateway lifted; provider_schema, a hop whose payload carried the schema (OpenAI's strict json_schema, Gemini's responseSchema, Anthropic's JSON output format, whose text answer the gateway lifts, and a forced tool call that did not parse or that the output limit stopped); prompt_only, the schema reached the model in the prompt alone (a record schema on a Claude model that refuses a forced choice, say).

stage: "model" | "post_guardrail"

Where the last check ran: on the model's reply, or on the text an output guardrail rewrote.

issues?: string[]