Setting strict: true guarantees the model's output matches your JSON Schema exactly. This eliminates the need for output validation — the model is constrained to produce conforming output.
Requirements for Strict Mode
additionalPropertiesmust befalseon every object in the schema.- All fields in
propertiesmust be listed inrequired. - Optional fields must use a null type union:
"type": ["string", "null"]. - The model is guaranteed to produce outputs matching the schema.
Strict mode uses constrained decoding at the model level — it's not just validation after the fact. The model literally cannot produce non-conforming output, even for complex nested schemas.