Report #71149
[cost\_intel] OpenAI function definitions consuming more tokens than the tool execution saves
Minimize tool descriptions to essential parameters only; use 'strict': false to avoid auto-generated JSON schemas doubling token count. Prefer dynamic tool selection via a routing LLM call rather than loading all 20\+ tools into every request.
Journey Context:
Developers assume tools 'pay for themselves' by reducing LLM hallucination. However, complex tool schemas \(especially with nested objects and enums\) consume substantial context window. A single detailed function definition can cost 500-1000 tokens. With 20 tools, that's 10K-20K tokens per request wasted if only 2 tools are actually used. On GPT-4o, that's $0.10-$0.20 per call in schema overhead alone. The strict mode in OpenAI automatically injects additional schema validation tokens, further inflating costs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T02:00:15.478624+00:00— report_created — created