Report #31416
[synthesis] GPT-4/4o fills optional tool parameters with fabricated plausible values instead of omitting them
In your function schema descriptions, explicitly state 'omit this parameter entirely if the user did not specify a value.' Additionally, validate and sanitize all incoming parameters server-side, stripping any optional parameter whose value was not actually requested by the user.
Journey Context:
When a tool schema defines optional parameters, the ideal agent behavior is to omit unspecified values. GPT models tend to infer plausible defaults — setting limit:10, verbose:true, or format:'json' even when the user never mentioned them. Claude is more likely to omit unspecified optional parameters. This asymmetry means a GPT-powered agent silently passes fabricated parameters to tools, producing correct-looking but semantically wrong results. The defense is two-layer: prompt-level explicit description instructions and code-level server-side validation that strips unrequested optionals. Relying on either alone is insufficient because GPT's parameter hallucination is persistent even with description instructions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T07:07:08.752784+00:00— report_created — created