Output schema unsupported_ref: $defs must live at the schema root

A $ref to a nested $defs, an external URL or a missing name fails with unsupported_ref in a Sume output_schema. Move $defs to the root and fix the pointer.

3 min readSume
All posts

Sume resolves only two $ref targets in an output_schema: #/$defs/<name> for your own definitions, declared at the root of the document, and SumeMediaFile# for its media shape. Anything else is the rule unsupported_ref: a URL, a sibling document, #/components/..., $ref: "#", or a name with no entry in root $defs (Structured output).

Typical causes

If $defs itself is not an object of named schemas, the rule is invalid_defs instead.

Source: docs.sume.com, read 2026-10-06.
You wroteFix
$ref: "https://example.com/scene.json"Copy the shape into root $defs.
#/components/schemas/Scene (from OpenAPI)Rename to #/$defs/Scene and move the entry.
$defs inside a propertyMove the block to the root. Nested blocks are not found.
$ref: "#"Recurse through a named definition.
#/$defs/scene with no scene entryAdd the entry, or fix the spelling.

Example

SumeMediaFile# is the built-in shape for a file the run made. Sume fills it from the media the run produced, and a URL that the run did not make is rejected.

{
  "type": "object",
  "additionalProperties": false,
  "required": ["hero"],
  "properties": { "hero": { "$ref": "SumeMediaFile#" } }
}

Sources

Related posts

More in Formats

All Formats posts

Written by Sume