Output schema max_enum_values: 1,000 values per enum, then what
Sume refuses an enum of more than 1,000 values with rule max_enum_values. Use a string with a pattern or format, or split the list into two enums.

An enum in a Format output_schema may hold at most 1,000 values. A longer list gets 400 output_schema_invalid with the rule max_enum_values (Structured output). If the list is a catalog of ids, type the field as a string and check membership on your side after you read output.
Three ways out
pattern, format, minLength and maxLength are on the allowlist for strings, so a shape such as ^sku_[a-z0-9]{8}$ can be enforced by Sume. Membership in your catalog cannot.
| Situation | What to do |
|---|---|
| A closed list under 1,000 | Keep the enum. |
| A long catalog of ids | Use type: string, optionally with pattern, and validate against your catalog in code. |
| Two levels, such as category then item | Use one enum for the category and a string for the item. |
Check on your side
A schema fixes the shape. It does not prove that a value exists. After you read output, confirm each id against your own list before you act on it.
known = {"sku_a1b2c3d4", "sku_e5f6a7b8"}
output = {"items": [{"sku": "sku_a1b2c3d4"}, {"sku": "sku_zzzzzzzz"}]}
bad = [i["sku"] for i in output["items"] if i["sku"] not in known]
print("unknown ids:", bad)Sources
Related posts
More in Formats
- Output schema max_depth: 10 levels, and $defs recursion is free
Sume's output_schema allows 10 levels of literal nesting. Past that you get max_depth. A self-referencing $defs entry does not add to the depth count.
- Output schema max_string_length: descriptions use a 120,000 budget
A big Format output_schema can fail with max_string_length although no field is long. The 120,000-character budget covers every key, name and string in it.
- 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.
- 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.
Written by Sume