Claude structured outputs allOf limits vs Sume output_schema

Anthropic supports allOf with limitations in structured outputs. Sume's output_schema rejects allOf and oneOf and accepts anyOf. How to port a schema.

5 min readSume
All posts

A schema that uses allOf may pass Claude's structured outputs, within its stated limits, and fail Sume's output_schema on the first request. Sume accepts anyOf but rejects oneOf, allOf, not and if/then/else. The fix is mechanical: flatten allOf into one object, and turn oneOf into anyOf.

What does each side list?

Anthropic's page lists supported and unsupported features. Sume's reference lists an allowlist and a rejected list.

Composition keywords (read 2026-10-02)
KeywordClaude structured outputsSume output_schema
anyOfSupportedAccepted
allOfSupported with limitationsRejected
oneOfNot on the page's supported list that I readRejected
$ref and $defsSupported, no external refsAccepted for #/$defs/* and SumeMediaFile#
Root $ref to #Recursive schemas not supportedRejected

How do I port an allOf schema to Sume?

Merge the branches into one object. Every property from every branch goes into a single properties block, and every key goes into required. A field that was optional becomes a union with null, since Sume wants every property required.

For oneOf, change it to anyOf. The two differ in strictness, since anyOf allows more than one branch to match, so make sure your branches cannot overlap, for example by adding a const field that tells them apart.

  • Replace allOf by merging properties and required.
  • Replace oneOf by anyOf with a discriminating const.
  • Replace nullable true by a type union with null.
  • Put reused shapes under $defs and point to them with #/$defs/name.

What happens when I get it wrong?

Sume answers 400 output_schema_invalid with a violations array. Each entry has a path, a stable rule token such as unsupported_keyword, and a human message. Switch on the rule, not on the message, since the message may change. Nothing runs, and nothing is billed.

On the Claude side, read the page's list before you build, because I cannot say from the page how a failing schema is reported. Do not copy a schema between them untested.

Where to read next

The structured output reference has the full violation table and the size limits: depth 10, 5000 properties, 1000 enum values.

Sources

Related posts

More in Models

All Models posts

Written by Sume