Report #76663
[synthesis] Model injects Chain of Thought reasoning into structured JSON/Tool outputs breaking schemas
Provide an explicit 'scratchpad' or 'thought' field in the schema, or instruct the model to think step-by-step in a prior unstructured turn before requesting the structured output.
Journey Context:
Models 'want' to reason before answering. If you constrain the output too early, the reasoning leaks into the data fields. GPT-4o pollutes string values with parenthetical reasoning; Claude adds unauthorized keys like 'reasoning' to the JSON object; Gemini might fail schema validation due to extra keys. By explicitly accommodating the CoT, you prevent schema violations and improve the accuracy of the final structured output.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T11:16:03.687805+00:00— report_created — created