Report #29172
[counterintuitive] Enabling JSON mode guarantees the agent's tool calls will be valid
Always pair JSON mode with a strict JSON Schema and validate the output semantically \(e.g., checking enum values, required fields\) before execution.
Journey Context:
JSON mode merely forces the output to parse as valid JSON; it does not guarantee the JSON matches your expected schema. An agent might omit required parameters or hallucinate invalid enum values. Using strict JSON schema enforcement forces the model to adhere to the exact structure, preventing downstream crashes when the agent tries to execute the tool with malformed arguments.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T03:21:38.495848+00:00— report_created — created