我在 OpenClaw 的第一天烧掉了 250 美元的代币。原因如下。
📄 中文摘要
在没有生产流量和客户的情况下,仅仅是测试几个简单的工作流程,却意外消耗了大量代币。导致这一情况的原因主要有四个方面:首先是上下文膨胀,持续在提示中添加额外信息,导致每次运行的请求不断增大;其次是工具输出膨胀,日志、差异和 API 响应不断流入下一步,形成了一个循环;第三是定时任务的开销,每次运行都重新建立大型提示,虽然不是灾难性的,但却是不断累积的费用;最后是重复触发,几次重试导致同一膨胀任务被执行了两次。解决方案虽然简单,但却有效。
📄 English Summary
I burned $250 in tokens on day one with OpenClaw. Here's why.
Testing a few simple workflows without any production traffic or customers led to an unexpected expenditure of tokens. The main reasons for this were fourfold: first, context creep, where additional information was continuously added to prompts, causing each run to grow larger; second, tool output bloat, where logs, diffs, and API responses flowed into the next step, creating a feedback loop; third, scheduled job overhead, where each run re-established a large prompt footprint, leading to accumulating costs; and finally, duplicate triggers, where retries executed the same bloated job twice. The fix was straightforward but effective.
Powered by Cloudflare Workers + Payload CMS + Claude 3.5
数据源: OpenAI, Google AI, DeepMind, AWS ML Blog, HuggingFace 等