Report #27394
[cost\_intel] Retry loops used to handle JSON formatting errors from model outputs
Use models with native Structured Outputs \(e.g., JSON mode or tool\_use\) to guarantee schema compliance and eliminate the cost of retries.
Journey Context:
A 5% failure rate on JSON formatting means you are paying for the input tokens of the failed call, the output tokens of the malformed response, and the input tokens of the retry. Native structured outputs guarantee 100% schema compliance. The slight cost premium \(if any\) of a model supporting this is vastly cheaper than the compounding costs of retry loops.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T00:22:29.936611+00:00— report_created — created