Output schema node with only a description: missing_type violation

A property with only a description is legal JSON Schema, but Sume rejects it with missing_type. Give it a type, a $ref or an anyOf, and move constraints.

3 min readSume
All posts

A property such as "notes": { "description": "anything the run wants to say" } is valid JSON Schema, where it means "any value". Sume rejects it with 400 output_schema_invalid and the rule missing_type. Every node needs a type, a $ref or an anyOf, and an array also needs items (Structured output).

The reason is the same as for the rest of the strict subset. Sume only fills a schema it can mechanically satisfy, and "anything" gives it nothing to satisfy.

The fix

Pick the real type. If the value can be absent, use a nullable union, because every declared property must also appear in required.

// rejected: missing_type at #/properties/notes
"notes": { "description": "anything the run wants to say" }

// accepted
"notes": { "type": ["string", "null"], "description": "Free text, or null." }

Where constraints go when you use $ref or anyOf

$ref and anyOf each short-circuit the node that contains them. Sume checks the sibling keywords next to them against the allowlist, but they have no other effect. If you write { "$ref": "#/$defs/scene", "minItems": 1 }, the sibling does nothing useful. Put constraints inside the anyOf branches or inside the $defs entry.

  • Annotations (title, description, default, examples, $schema, $id) are accepted next to a type and do not replace one.
  • strict: false does not relax any rule. Sume accepts and stores it but still rejects the schema.
  • There is no JSON-mode escape hatch. You bind a schema, or you take the built-in sume/action-run-output/v1 shape.

Check before you pay

Because the rejection happens at submit, you can test a schema with the cheapest request you have and read details.violations[]. Nothing runs and nothing is charged. Log the rule and path of each entry rather than the message, since the message wording can change.

Sources

Related posts

More in Formats

All Formats posts

Written by Sume