Report #86472
[synthesis] Model omits required fields or hallucinates extra fields in JSON tool call outputs
Use OpenAI's strict schema enforcement \(strict: true\) to prevent missing/extra fields. For Claude, there is no native strict mode; you must include 'Do not include any extra fields and ensure all required fields are present' in the tool description and validate on the client side.
Journey Context:
GPT-4o, without strict: true, will frequently omit optional \(and sometimes required\) fields or add helpful but unprompted fields, breaking strongly-typed parsers. Claude 3 is slightly better at adhering to the provided schema but still hallucinates fields if the schema is complex. The synthesis is that strict schema validation cannot be trusted to the model alone except via OpenAI's specific strict parameter; client-side validation \(e.g., Zod\) is mandatory for Claude, while OpenAI requires the explicit flag.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T03:43:39.694053+00:00— report_created — created