Blog · 2026-09-11 · Vynaris Team
Cache reads dominate agent costs at 20k tokens: the quadratic break-even across 5 models
Cache reads become half your agent bill at 18k tokens on 10:1-ratio models. Fable 5.1 and DeepSeek V4.1-Flash push the crossover to 69k. The break-even depends on price ratios, not absolute price. Cross-model cost analysis with simulation math.
Cache reads become half your agent bill at roughly 18,000 tokens on 10:1-ratio models (Opus 5, Sonnet 5, Gemini 3.8 Flash). Fable 5.1 and DeepSeek V4.1-Flash push the crossover to 69,000. The break-even depends on price ratios. Prices verified 2026-09-11.
TL;DR
- exe.dev analyzed 250 coding agent conversations and found cache reads dominate costs quadratically: 50% of the bill at roughly 20k tokens, 87% by conversation end on Opus 4.5 rates (131 points on Hacker News).
- We extended the analysis across 5 models at current rates. All 10:1-ratio models share a break-even near 18k tokens. Fable 5.1 and DeepSeek V4.1-Flash share one near 69k despite different input-to-cache-read ratios.
- At 50k tokens of context, cache reads are 74% of the bill on Opus 5 and Sonnet 5, but only 42% on Fable 5.1 and DeepSeek.
- The crossover depends on the cache-write-to-cache-read and output-to-cache-read ratios, not the headline input-to-cache-read ratio alone. Anthropic's 1.25x cache-write surcharge narrows the gap.
Verdict table
Model Input:cache-read Break-even (cache reads = 50%) Cost at 50k tokens Cache reads at 50k
------------------------------------------------------------------- ---------------- ------------------------------ ------------------ ------------------
[Claude Opus 5](https://vynaris.com/models#claude-opus-5) 10:1 ~17,670 tokens $2.92 74.3%
[Claude Sonnet 5](https://vynaris.com/models#claude-sonnet-5) 10:1 ~17,670 tokens $1.75 74.3%
[Gemini 3.8 Flash](https://vynaris.com/models#gemini-3-8-flash) 10:1 ~16,245 tokens $0.43 76.0%
[Claude Fable 5.1](https://vynaris.com/models#claude-fable-5-1) 40:1 ~68,970 tokens $2.58 42.0%
[DeepSeek V4.1-Flash](https://vynaris.com/models#deepseek-v4-flash) 50:1 ~68,970 tokens $0.031 42.0%All prices per 1M tokens. Simulation uses 285 input tokens and 100 output tokens per call (exe.dev medians).
The quadratic cache-read problem
In a coding agent loop, each API call sends the full conversation history. The provider caches that history. On the next call, you pay the cache hit rate to read it back instead of the full input tokens rate. That cache-read price is typically 10% of input.
The cost grows quadratically because call N reads the entire history so far. Call 1 reads nothing. Call 50 reads 49 calls of context. Call 200 reads 199 calls. The cumulative cache-read bill is a triangular sum: proportional to N squared, not N.
Philip Zeyliger at exe.dev visualized this in February 2026. He sampled 250 conversations from their LLM gateway and found that cache reads hit 50% of cost at roughly 20,000 tokens and 87% by conversation end. One feature-implementation conversation cost $12.93 total, with cache reads consuming most of it. The post earned 131 points on Hacker News.
The exe.dev simulator used Opus 4.5 rates: $5 input, $6.25 cache write, $0.50 cache read, $25 output tokens per million. Opus 5 carries identical rates. Our simulation with the blog's stated medians (285 input, 100 output per call) puts the break-even at 17,670 tokens, close to the simulator's 20,000. The difference comes from per-call token assumptions the blog does not fully specify.
The ratio, not the price
The break-even depends on price ratios, not absolute prices. All Anthropic models with a 10:1 input-to-cache-read ratio share the same break-even because their cache-write and output prices scale proportionally. Opus 5 at $5/$25 and Sonnet 5 at $3/$15 hit 50% cache-read share at the same context length.
The non-obvious finding: Claude Fable 5.1 (40:1) and DeepSeek V4.1-Flash (50:1) share the same break-even despite different input-to-cache-read ratios. Here is why.
The break-even formula for uniform step size is:
n = 1 + 2 * (cw * d + op * o) / (cr * d)
Where cw is cache-write price, cr is cache-read price, op is output price, d is tokens added per call, and o is output tokens per call. The crossover depends on cw:cr and op:cr, not just input:cr.
Fable 5.1 charges 1.25x input for cache writes ($12.50), raising cw:cr from 40 to 50. DeepSeek charges no write surcharge (cache miss = input = $0.15), so cw:cr stays at 50. Both models also have op:cr = 200:1. Same ratios, same break-even, despite a 40:1 versus 50:1 headline.
Gemini 3.8 Flash has no cache-write surcharge either, which gives it cw:cr = 10:1 versus Anthropic's 12.5:1. Its break-even arrives slightly earlier: 16,245 tokens versus 17,670 for the Anthropic 10:1 group.

What this costs at scale
At 50,000 tokens of context window, the bill and its composition diverge sharply:
Model Cost at 50k Cache reads at 50k Cost per 1,000 conversations
------------------- ----------- ------------------ ----------------------------
Claude Opus 5 $2.92 74.3% $2,919
Claude Sonnet 5 $1.75 74.3% $1,751
Claude Fable 5.1 $2.58 42.0% $2,583
Gemini 3.8 Flash $0.43 76.0% $428
DeepSeek V4.1-Flash $0.031 42.0% $31DeepSeek is 94x cheaper than Opus 5 at the same context length, but that gap is not about cache reads. It is about the absolute price per token. The cache-read percentage is identical between DeepSeek and Fable 5.1 (42%). Put your own token counts into the cost calculator before extrapolating.
Our coding agent cost per task analysis shows why the 20:1 read-to-write ratio in agent loops makes cache-read pricing the dominant variable. The Fable 5.1 cache-read price cut covers the Anthropic-specific mechanics. Today's GPT-5.6 promo expiry raised Sol's rates to $5/$30, putting it in the same 10:1 break-even group as Opus 5.
When this does not matter
This analysis assumes prompt caching is enabled and the cache stays warm between calls. Three conditions break that assumption.
First, if your conversations are short (under 10 calls, roughly 3,000 tokens), cache reads never reach 50%. The linear costs dominate. Second, if the cache expires between calls (Anthropic's 5-minute TTL, Gemini's hourly storage fee), you pay full cache-write price on every re-read, which shifts costs toward writes. Third, if you are not using an agent loop at all (single-turn chat, batch processing), there is no cumulative context to read.
Do not switch models based on the break-even alone. Fable 5.1 has a later crossover than Sonnet 5 but costs more at every context length because its absolute prices are higher. The break-even tells you when cache reads dominate, not which model is cheaper. The context window surcharge that kicks in above 200k tokens on some models is a separate cost layer. This article isolates the cache-read curve.
Verification
Our simulation reproduces the exe.dev reference point. With Opus 5 rates (identical to Opus 4.5), the model reaches $12.93 total cost at 113,430 tokens with cache reads at 86.9% of the bill. exe.dev reported 87% at $12.93. The 0.1% gap comes from rounding in per-call token counts.
All prices were fetched live from provider pages on 2026-09-11: Anthropic, DeepSeek, Google. DeepSeek's live page shows V4.1-Flash at $0.15 cache miss and $0.003 cache hit per million tokens (off-peak). The prior snapshot recorded $0.22 and $0.007, which was the older V4-Flash rate before the model update. The token cost math uses the live numbers.
FAQ
Does this mean I should switch to Fable 5.1 or DeepSeek for long agent conversations?
Not on this evidence alone. The break-even tells you when cache reads dominate, not which model is cheaper overall. Fable 5.1 costs $2.58 at 50k tokens versus Sonnet 5's $1.75, despite a later break-even. Fable's absolute prices are higher. DeepSeek is cheapest at $0.031, but quality and KV cache infrastructure differ. Measure cost per task on your own workload.
Why does Gemini 3.8 Flash break even earlier than the Anthropic 10:1 models?
Gemini charges no cache-write surcharge. The first send costs regular input ($0.75 per million tokens), and subsequent reads cost $0.075. Anthropic charges 1.25x input for cache writes. That lower write cost means cache reads catch up sooner: 16,245 tokens versus 17,670.
Does the exe.dev analysis apply to non-coding agents?
The quadratic pattern applies to any agent loop that re-sends context on each call. Coding agents tend to have long conversations with many tool calls and large code context, which makes the effect visible sooner. A customer-support agent with 5-turn conversations may never hit the break-even.
How accurate is the break-even formula?
The formula assumes uniform step size (same tokens added per call). Real conversations have variable step sizes. The exe.dev blog notes that cache-read cost is really tokens times calls, not tokens squared. Our simulation matches the exe.dev reference ($12.93, 87%) to within 0.1%, which validates the model for typical agent workloads.