今日已更新 339 条资讯 | 累计 19899 条内容
关于我们

How I replaced LLM calls with coding agent calls and saved money

popiol 2026年07月11日 05:46 4 次阅读 来源:Dev.to

When building an AI agent, you need LLM calls. It can be done via a remote API or a local API, but either way you need to do it. Whether the agent is a simple conversational agent or a ReAct agent with a bunch of tools, whether it's using a complex graph or a simple RAG, it must be based on the concept of sending prompts to the language model. But, what if we replace the language model with... another agent? Let's say we already have a smart agent with a bunch of tools that can handle complex problems. Why not use it to build a new agent on top of it? This way we can focus on the specific custom functionality we want to achieve, while already having the common functionalities covered by the underlying agent. You might think this must be expensive. You get a better performance, so you have to pay for it, right? Well, not necessarily. The catch is that the coding assistants are actually surprisingly cheap when compared to API prices. They offer much more than raw LLM calls, they offer amazing agent functionality, but the cost is actually lower, and it's not a small difference. The cost of LLM calls per 1M tokens is usually between $2 and $7. For coding assistant subscriptions, it's a bit more tricky to calculate because you pay for monthly subscription, but it can be still converted to per 1M tokens cost, and from what LLM just told me it is around $0.08 to $2. That's a huge difference! And the complex agents are cheaper than raw LLM's! according to ChatGPT: Service Cost per 1M tokens Codex / ChatGPT coding plan ~$0.08 Cursor Pro ~$0.08–0.25 GitHub Copilot Pro ~$0.10–0.30 Claude Pro / Claude Code ~$0.74 GPT-5 API ~$2.1 Claude Sonnet API ~$4.2 Claude Opus API ~$7.0 according to Claude: Service Cost per 1M tokens Haiku 4.5 (API) $1.80 Sonnet 5 (API, intro thru Aug 31 '26) $3.60 Sonnet 5 (API, standard) $5.40 Opus 4.8 (API) $9.00 Fable 5 (API) $18.00 Claude Code — Pro ~$1.10–$2.15 (est.) Claude Code — Max 5x ~$2.10–$4.15 (est.) Claude Code — Max 20x ~$2–$4 (est.) So, why

本文内容来源于互联网,版权归原作者所有
查看原文