Skip to main content

Strict mode (structured outputs)

AI concepts

Provider and API features that guarantee model output matches a JSON Schema (or equivalent)—stronger than “JSON mode,” which only ensures valid JSON, not correct fields or types.

In production strict (or schema-constrained) modes, the platform enforces that every field, type, and required property matches your contract. That reduces silent shape drift when agents call tools or return machine-readable payloads.

How this ties to agents

Poor schemas produce unreliable tool calls. Teams often define schemas first (e.g. Pydantic or Zod), then align prompts and validation. Pair strict outputs with function calling and actionable error objects so the model can recover when something fails.