Report #50378
[cost\_intel] OpenAI function definition token bloat consumes 500-2000\+ tokens per request regardless of tool usage
Move tool descriptions to external documentation; use minimal JSON schemas with only required fields; implement dynamic tool retrieval where only likely-relevant tools are included based on intent classification
Journey Context:
OpenAI's Chat Completions API requires sending the full JSON Schema for every tool in every request. A complex tool with nested objects and detailed descriptions can consume 1,000\+ tokens. With 10 tools, you pay for 10,000 tokens of overhead on every single request, even if the user says 'hello' and no tools are called. The trap is treating tool definitions as 'cheap metadata'—they're not; they're expensive prompt tokens. Aggressive pruning of descriptions and dynamic tool selection \(only including the 2-3 tools likely needed\) can cut per-request costs by 70%.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T15:02:35.114043+00:00— report_created — created