Format structured output: anyOf passes, oneOf and allOf are rejected

Which JSON Schema keywords a Sume Format output_schema accepts, the 400 output_schema_invalid shape, and how it lines up with OpenAI strict structured outputs.

5 min readSume
All posts

Sume accepts a strict, OpenAI-style subset of JSON Schema. anyOf is allowed; oneOf, allOf, not and if are not. The root must be exactly type: object, every object needs additionalProperties: false, every property must be in required, and every node needs a type, a $ref or an anyOf. Arrays need items.

OpenAI documents the same family of rules: its guide lists additionalProperties: false, required fields, $defs and recursive $ref among supported features, and says some JSON Schema features are unavailable (read 2026-10-03). A schema written for one usually ports to the other with small edits.

Limits you can hit

Sume output_schema limits per Sume docs (read 2026-10-03)
LimitValue
Nesting depth10
Total properties5000
Enum values1000
Total string characters120,000
$ref targets#/$defs/* or SumeMediaFile#
Recursive $ref "#"Rejected

What a rejection looks like

A rejected schema returns 400 output_schema_invalid with details.violations, a list of {path, rule, message} objects pointing at the offending node. Nothing is charged for a rejected request, so you can iterate. strict: false changes nothing, and there is no JSON-mode equivalent.

Sources

Related posts

More in Formats

All Formats posts

Written by Sume