Report #67555
[synthesis] Schema validation crashes on null tool call arguments
Define all optional tool parameters with \`\["string", "null"\]\` type and a default value of null in the JSON schema.
Journey Context:
When a model decides not to provide an optional string parameter, GPT-4o omits the key entirely from the JSON arguments, Claude 3.5 Sonnet explicitly passes a JSON \`null\` value, and Gemini 1.5 Pro sometimes passes the string literal \`"null"\` or \`"None"\`. If your schema strictly defines the type as \`"string"\`, Claude's \`null\` will throw a Pydantic/type validation error, GPT-4o's omission might fail required checks if misconfigured, and Gemini's string literal will pollute downstream logic. Making the type a union of string and null is the only cross-model safe pattern.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T19:52:18.585973+00:00— report_created — created