智能体
dev.to ·
@llmwaves
超过 20 万 token 后,你的 LLM 成本估算就错了
文章指出多数模型对比表忽略了长上下文的分档定价:Gemini 3.1 Pro 在 20 万 prompt token 以上输入价格翻倍($2→$4/百万),Grok 4.6 在同一阈值从 $2/$6 变为 $4/$12;OpenAI 定价页仅覆盖 27 万 token 以下,之上无公开费率;Claude 4.6 起取消上下文分档,100 万窗口内按同一单价计费。对携带代码库上下文的编码 Agent 和 RAG 管线影响显著。
AI推荐理由 给出可核对的具体定价阈值与倍率差异,对长上下文 Agent 与 RAG 的成本估算有直接实用价值;但属个人博客整理,未附官方定价页链接,具体数字需以厂商页面复核。
74
正文
I went looking for a straight answer to "what will this cost per month" and found that almost every comparison table gets it wrong the moment prompts get long. Not slightly wrong. Double.
The threshold nobody shows you
Gemini 3.1 Pro is $2 per million input tokens, $12 per million output. That is the number in every roundup. It holds up to 200,000 prompt tokens, and above that line Google doubles it.
Grok 4.6 does the same thing at the same threshold — $2/$6 becomes $4/$12.
OpenAI's pricing page carries a line that is easy to miss: the published rates cover context lengths under 270,000 tokens. There is no published rate above that.
Claude is the odd one out, and in the useful direction. From Claude 4.6 onward there is no context tier. A 900,000-token prompt bills per token at exactly the rate a 9,000-token prompt does, across the whole 1M window.
Why it matters more than it sounds
Take a coding agent carrying a repository in context, or a RAG pipeline that fills the window because it can. 260,000 input tokens per request is an ordinary day for either.
On short prompts, Gemini 3.1 Pro's input rate looks 2.5x cheaper than Claude Opus 5's. Cross 200,000 tokens and that gap closes hard, because one of them changed price and the other did not. Every comparison built on headline rates has the ranking wrong for that workload.
DeepSeek moves on a different axis
No context tier at all — but since 16 August 2026 it prices by time of day. Peak is 01:00-04:00 and 06:00-10:00 UTC, seven hours out of twenty-four, and rates double inside it. So the honest number for DeepSeek is not a rate, it is a blend that depends on when your traffic actually lands.
Cache reads are not all 10%
The other quiet assumption is that a cache hit costs 10% of the input rate. Mostly true, not always: Claude Fable 5.1 reads at 0.025x base, not 0.1x. Gemini 3.5 Flash-Lite has no context caching at all, so a comparison that assumes a cache discount is inventing one.
The full table
I wrote every current rate up as a reference, including the thresholds, the cache-read rates and the introductory Gemini Flash pricing that expires on 31 December 2026: LLM API Pricing Reference
Price is one axis
Cost per token decides less than people expect. A model that is half the price and takes three times the tokens to finish the same job is not cheaper. For speed, context window, benchmark scores and cost per task across 323 models, the LLM Waves leaderboards track all of it, and the economics board ranks by cost per task rather than headline rate.
Rates collected from provider documentation on 13 September 2026.