OpenAI 账单审计:45分钟内的令牌支出分解(重试、工具循环、上下文膨胀)

📄 中文摘要

审计过程中应停止以每次请求的成本为思考方式,转而关注每个成功任务的成本,并将总支出分为四个部分:基础生成、上下文膨胀、重试与超时、工具/代理循环。通过识别哪个部分占据了支出的主导地位,可以明确优先修复的方向。进行审计前,需收集相关数据,包括每次请求的日志、OpenAI 使用导出及部分应用日志等。

📄 English Summary

OpenAI Bill Audit in 45 Minutes: Token Spend Decomposition (Retries, Tool Loops, Context Bloat)

The audit process emphasizes shifting focus from cost per request to cost per successful task, categorizing total spending into four segments: base generation, context bloat, retries and timeouts, and tool/agent loops. Identifying which segment dominates spending helps prioritize fixes. Before starting the audit, relevant data should be gathered, including per-request logs, OpenAI usage exports, and partial application logs.

Powered by Cloudflare Workers + Payload CMS + Claude 3.5

数据源: OpenAI, Google AI, DeepMind, AWS ML Blog, HuggingFace 等