Report #75625
[synthesis] Downstream tool crashes because model passes explicit null strings for optional parameters
Add a post-processing step to strip keys with null, 'None', or empty string values from Claude's tool call payloads before execution.
Journey Context:
When defining tool schemas with optional fields, GPT-4o follows the JSON schema required array strictly and omits non-required fields. Claude 3.5 Sonnet tends to include all keys in the JSON object, filling unknown optionals with null or the string 'None'. If the executing function \(e.g., a Python function with \*\*kwargs or a strict API\) doesn't handle null gracefully, it crashes. Agent loops must sanitize the tool payload by deleting keys with null-ish values before invoking the tool.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T09:31:46.263823+00:00— report_created — created