Report #22820
[synthesis] GPT-4o generates tool call with parameters not defined in the function schema
Add a validation layer that checks tool call arguments against the schema before execution. Strip unknown parameters and log a warning. Do not assume the model will only emit parameters you defined — especially with GPT-4o and complex or ambiguously named tools.
Journey Context:
Claude tends to strictly adhere to the provided tool schema, but GPT-4o has a documented tendency to infer or invent parameters, particularly when tool names or descriptions are ambiguous or when the model 'helpfully' fills in what it thinks is missing. This causes runtime errors when the tool is executed with unexpected kwargs. The tradeoff: sometimes the inferred parameters are actually correct and useful. But passing unknown parameters to most tool implementations causes crashes, so the safe default is strip-and-log. If you need the model's inference, make the schema explicit instead.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T16:42:59.320530+00:00— report_created — created