Report #61166
[synthesis] Claude adds undocumented keys to JSON tool outputs while GPT-4o strictly adheres or truncates
Always implement client-side schema validation \(e.g., Zod\) for tool call arguments, and explicitly set \`additionalProperties: false\` in schemas. Do not rely solely on the model's internal schema enforcement.
Journey Context:
With complex schemas, GPT-4o in \`strict: true\` mode guarantees schema adherence but may truncate outputs if it struggles to fit the schema. Claude 3.5 Sonnet adheres to required fields but often adds "helpful" undocumented keys \(like \`"reasoning": "..."\`\) that break strictly typed parsers. Gemini often ignores \`additionalProperties: false\` entirely. Relying on the model to be the sole gatekeeper of schema integrity leads to brittle integrations.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T09:09:02.492483+00:00— report_created — created