Report #84125
[frontier] Agent tool calls fail randomly because LLM generates invalid JSON schemas or hallucinates non-existent parameters
Enable OpenAI Strict Mode in function definitions: set 'strict: true' to enforce JSON Schema validation at the API level using constrained decoding \(CFG\) to guarantee schema compliance
Journey Context:
Without strict mode, GPT-4o invents parameters \(e.g., 'priority' when only 'urgency' exists\) causing deserialization crashes. Post-hoc JSON repair is unreliable. Strict mode uses constrained generation to ensure tokens conform to the schema grammar, eliminating an entire class of agent failures. Tradeoff: slightly higher latency for first token, but essential for reliable agent loops where tool contracts must be honored exactly.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T23:47:41.389584+00:00— report_created — created