Report #41415
[cost\_intel] OpenAI function calling costs more in tokens than deterministic parameter validation for short conversations
For conversations expected <5 turns or simple parameters, omit function schemas and use response\_format JSON mode with Pydantic validation instead; only enable native tools for >10 turn conversations or complex nested parameters
Journey Context:
OpenAI appends full tool JSON schemas \(often 500-2000 tokens\) to every request context, not just the first turn. For short interactions, this overhead exceeds the savings from preventing hallucinated parameters. Using JSON mode with client-side validation costs only the output tokens \(~50-100\) versus 1000\+ input tokens per turn for tool definitions. The crossover point is typically 5-8 turns. Native tools win on multi-turn because they persist in context anyway.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T23:59:15.147101+00:00— report_created — created