Skip to content

JsonOutput

Defined in: core/src/types.ts:227

Ask for a JSON object matching schema. Providers that enforce schemas get it verbatim; the rest get JSON mode plus the schema in the prompt. Either way the caller validates: a provider’s “guaranteed” JSON is not one.

name: string;

Defined in: core/src/types.ts:228


schema: JsonObjectSchema;

Defined in: core/src/types.ts:229


optional strict?: boolean;

Defined in: core/src/types.ts:236

Force OpenAI’s strict schema mode on or off. Left unset, the adapters ask isStrictSchema and enforce whenever the schema actually qualifies. This keeps an optional field from turning a working call into a 400. Set it only to overrule that reading.