GLM 5.3 Flash JSON output vs Sume's strict output_schema rules

GLM-5.3-Flash supports JSON output. Sume's run output_schema is stricter: object root, additionalProperties false, all properties required. A schema that works.

5 min readSume
All posts

GLM-5.3-Flash supports structured output formats such as JSON, but that is a property of the model's own API. A Sume run output_schema has its own strict rules: the root is an object, every object sets additionalProperties: false, and every property is listed in required, with optional values written as nullable unions. Write the schema to Sume's rules, whichever model plans the run.

What each side documents

Z.ai's GLM-5.3-Flash page (read 2026-10-08) lists function calling, JSON structured output, native multimodal input, a 1M-token context, and up to 128K output tokens. The page does not mention MCP.

Sume's Create a schedule docs say a custom schema must obey the strict subset that OpenAI Structured Outputs enforces, and list the rules.

Sume output_schema strict subset, from the Create a schedule page (read 2026-10-08)
RuleValue
RootAn object
Each objectadditionalProperties: false
PropertiesAll listed in required; optional uses a nullable type such as ["string", "null"]
Depth, sizeMax 10 nesting levels, 5000 properties, 1000 enum values
$refOnly #/$defs/<name> or the registered SumeMediaFile#

A schema that passes

This is the image example from the docs. The caption is nullable, so it is in required anyway.

{
  "type": "object",
  "additionalProperties": false,
  "required": ["caption", "image"],
  "properties": {
    "caption": { "type": ["string", "null"] },
    "image": { "$ref": "SumeMediaFile#" }
  }
}

Where it is applied

On Agent Completions, output_schema binds the run's output to your schema, and Sume parses it after the run completes. On a schedule run, you can override the bound schema for one run, and response_format is accepted as an OpenAI-shaped alias, but sending both returns 400 invalid_request. A schema outside the subset fails before the run starts with output_schema_invalid and a list of violations, each with a path and rule.

Why the model's JSON mode is not enough

A model that emits valid JSON proves the text parses. Sume's check is about the run: whether media the agent produced can be projected into your fields. The docs describe a degraded case where the run completes and bills but output is null because the schema asks for something the run never made. Pick fields the task can fill, and make the rest nullable.

Sume's agent model catalog in the repository lists GLM 5.3 Flash as an enabled row. That is a statement about the Agents picker; it does not change how output_schema is checked.

Nullable is not optional

In many JSON schemas an optional field is simply absent from required. Sume's strict subset does not allow that. An optional value must still be listed in required and typed as a union with null. If you forget, the API returns an error whose violation has the rule required_completeness, a path such as #/properties/caption, and a message telling you to use a nullable type. Fixing it takes one line.

Keep the schema small. A flat object with three or four fields is easier for any model to fill and easier for you to review than a deep tree. The depth limit of 10 and the 5000-property cap are generous, but the failure you will meet in practice is a field that the task cannot fill, not a limit.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume