Report #61788
[synthesis] Model invents valid-looking but non-existent parameters in tool call JSON
Use OpenAI's Structured Outputs / strict mode for GPT-4o; for Claude, simplify schemas and avoid highly nested optional objects; for Llama 3, add explicit 'do not invent parameters' instructions.
Journey Context:
When a tool schema is complex, GPT-4o tends to hallucinate valid-looking but non-existent parameters \(inventing fields that fit the schema's style\). Claude 3.5 Sonnet tends to omit optional complex parameters entirely rather than hallucinating them. Open-source models like Llama 3 often mangle the JSON structure. Schema validation errors differ by model: GPT-4o fails on 'extra inputs are not permitted', Claude fails on 'missing required property' \(if it skips\). The right call is to tune the schema strictness: use additionalProperties: false strictly for GPT-4o, but make optional fields explicitly nullable for Claude to prevent omission.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T10:11:59.030860+00:00— report_created — created