Report #42942
[synthesis] Model sends empty strings or null strings for optional parameters instead of omitting them
Instruct GPT-4o to omit optional parameters; instruct Claude to only include populated fields; for Gemini, strictly define nullable in the schema.
Journey Context:
When a tool parameter is optional and the model doesn't have a value, models behave differently. GPT-4o often sends param: null or param: empty string, which can break strictly typed APIs. Claude 3.5 Sonnet sometimes sends param: N/A or omits it entirely depending on the phrasing. Gemini 1.5 Pro will omit it if the schema marks it as non-required, but if it includes it, it might send param: undefined as a string. Explicit negative instructions \(omit optional parameters if no value is available\) combined with strict schema definitions are required.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T02:33:01.083253+00:00— report_created — created