我追踪了每个 API 调用 30 天。60% 在错误的模型上浪费了钱。

📄 中文摘要

通过对一个月内的 API 调用进行记录,发现约3000次调用中,有1800次(60%)属于简单操作,如文件读取、文本搜索和基本问答;750次(25%)为中等复杂度的操作,包括代码重构、测试生成和摘要;而450次(15%)则为复杂操作,如架构决策和多文件调试。所有调用均发送至Claude Sonnet,费用为每百万个令牌15美元。简单操作可在DeepSeek-V3上以每百万个令牌1.80美元的价格运行,中等操作在GPT-4o上以每百万个令牌5美元的价格运行,只有复杂操作需要Sonnet。通过重新路由,月费用从240美元降低至更合理的水平。

📄 English Summary

I Tracked Every API Call for 30 Days. 60% Were Wasting Money on the Wrong Model.

Tracking API calls over a month revealed that out of approximately 3000 calls, 1800 (60%) were simple tasks such as file reads, grep, and basic Q&A; 750 (25%) were medium complexity tasks like code refactoring, test generation, and summarization; and 450 (15%) were complex tasks involving architecture decisions and multi-file debugging. All calls were directed to Claude Sonnet at a cost of $15 per million tokens. The simple tasks could run on DeepSeek-V3 for $1.80 per million tokens, while medium tasks performed adequately on GPT-4o at $5 per million tokens. Only the complex tasks genuinely required Sonnet. This routing adjustment significantly reduced monthly costs from around $240.

Powered by Cloudflare Workers + Payload CMS + Claude 3.5

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