Report #53299
[cost\_intel] Why does OpenAI JSON mode silently increase token costs by 10-20% vs function calling for identical schemas?
Prefer function calling over JSON mode for schemas with >3 fields; JSON mode lacks implicit schema injection, forcing the model to re-describe keys in every completion, inflating output tokens by 15-25%.
Journey Context:
Developers switch to JSON mode for simplicity, unaware that function calling's 'function' role in the prompt provides compressed schema awareness. JSON mode completions repeat key names for every value \(e.g., 'name': 'John', 'age': 30 vs a compact function arg\). On a 10-field schema, this adds 200\+ tokens per request. Only use JSON mode for truly unstructured outputs or when the client cannot handle function syntax; otherwise, function calling is strictly cheaper.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T19:57:36.972939+00:00— report_created — created