Skip to content

z-ai/glm-5.2 with reasoning enabled intermittently emits non-JSON completion content under strict structured output #174

Description

@fazpu

Observed on the GLM-5.2 LoCoMo smoke (2026-07-29, revision 624bd4b with the #172 32K completion cap): with reasoning at provider default, ~25–30% of Selection/Claimify calls return non-JSON completion content (varied lengths 1.2K–25K chars, e.g. "Expecting value: line 4613" — reasoning prose bleeding into the content field). Retries did not converge (failed rows grew while successes stalled). With effort=none via the reasoning-effort map, the same model is stable (zero such failures).

The truncation half of the original failure was fixed by #172; this is the residual: strict response_format is not consistently honored by this provider/model when reasoning is active — the §2.4 family.

Open design question (needs a decision before any reasoning-on arm): adapter-level content salvage (extract the JSON object from mixed content) was previously rejected in the #142 revert (retry-on-non-JSON) — a bounded deterministic salvage (e.g., first balanced top-level JSON object, metadata-recorded) is a different mechanism but sits on the same slope. Alternative: treat reasoning-on as unsupported for strict-schema seats until providers stabilize, and record it in §2.4.

The smoke/benchmark proceed on z-ai/glm-5.2 + effort=none (consistent, stable config).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions