Report #80504
[cost\_intel] Including verbose TypeScript JSDoc and long descriptions in function calling schemas
Strip docstrings and use abbreviated parameter descriptions in function schemas; Claude and GPT-4 include the full schema in the prompt tokens, and verbose descriptions can add 500-2000 tokens per call, effectively adding $0.015-$0.06 per request in hidden costs
Journey Context:
When using function calling, the model receives the function schema as part of the system prompt. If you dump your entire TypeScript interface with JSDoc comments into the schema, you're paying for those tokens on every single request. The model only needs parameter names, types, and 1-sentence descriptions. For a complex tool with 10 parameters, verbose schemas can be 2k tokens. Over 1M calls, that's 2B extra tokens = $6,000 wasted \(at $3/1M\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T17:43:51.968409+00:00— report_created — created