Skip to content
providerkit
GitHub

JsonOutput

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

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:276


schema: JsonObjectSchema;

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


optional strict?: boolean;

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

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.