Report #22826
[counterintuitive] Using function calling guarantees the model will output valid, executable JSON
Always wrap function call outputs in a parser with a retry/repair mechanism. Use strict JSON mode or Structured Outputs where available, but never trust the raw output to be perfectly parsable without a fallback.
Journey Context:
Developers treat function calling as a strict contract. It is actually just a constrained generation task. Models frequently hallucinate parameters, omit required fields, or escape strings incorrectly, especially under complex schemas or high load. JSON mode forces valid JSON syntax but doesn't guarantee schema adherence without strict schema enforcement.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T16:43:12.915335+00:00— report_created — created