Optional schemaOptional schemaThe key of a schema in AgentOSConfig.structuredSchemas, resolved before the turn.
Optional nameNamed in the instruction and in the output's meta. Default "reply".
Optional descriptionOptional maxRepair rounds after a reply that does not match. Default 2, clamped to 0..5.
Optional onWhen every attempt failed: end the turn with GMI_STRUCTURED_OUTPUT_INVALID, or return the last reply with meta.valid: false. Default error.
Optional streamStream the model's text deltas on a structured turn. Default false: the caller sees nothing before the check.
A Zod schema, or a JSON Schema object. One of
schemaandschemaRefis required.