Output schema required_completeness: list every property in required

Sume's strict output_schema wants every declared property in required, and no required entry without a property. Make a field optional with a null union.

3 min readSume
All posts

The rule required_completeness fires in two cases. A declared property is not in required, or a required entry names a property that does not exist. Fix both by making required match properties exactly. To make a value optional, keep it in required and allow null: "type": ["string", "null"] (Structured output).

Rejected and accepted

// rejected: required_completeness (caption not required, price has no property)
{
  "type": "object",
  "additionalProperties": false,
  "required": ["title", "price"],
  "properties": {
    "title": { "type": "string" },
    "caption": { "type": "string" }
  }
}

// accepted
{
  "type": "object",
  "additionalProperties": false,
  "required": ["title", "caption"],
  "properties": {
    "title": { "type": "string" },
    "caption": { "type": ["string", "null"] }
  }
}

Why optional means null

Sume does not allow a key to be absent. A field the run could not fill comes back as null, so the object always has the same keys and your parser needs no branches for missing keys. Read null as "the run had nothing to put here", and require only what the Format truly always makes.

Related violations in the same response

The same 400 lists every problem, so a schema that also lacks additionalProperties: false shows additional_properties_false next to required_completeness. Fix them all in one edit.

Sources

Related posts

More in Formats

All Formats posts

Written by Sume