Report #63818
[synthesis] Optional tool parameters are omitted, nulled, or filled with hallucinated defaults depending on the model
Design tool execution handlers to treat missing keys, \`null\`, and empty strings \`""\` as equivalent 'absent' states. Do not rely on key presence to indicate a parameter was explicitly provided. Sanitize inputs before execution.
Journey Context:
When defining tool schemas with optional parameters, developers expect the model to omit the key if the user didn't provide it. GPT-4o generally omits the key, which is standard JSON schema behavior. However, Claude 3.5 Sonnet frequently includes the key with a \`null\` or \`""\` value, which can cause downstream type errors if the executor strictly validates. Gemini Pro might read the parameter description and hallucinate a default value \(e.g., setting \`limit\` to 10 if not specified\). Assuming key omission leads to TypeErrors or unexpected queries. The execution layer must normalize these states.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T13:36:30.042292+00:00— report_created — created