Technical Research Brief • Dataset verified 2026-10-17

Prompt Caching Economics: The Cheapest Lever in Agent Coding

A 20-turn agent session re-sends the same repository context on every turn. Prompt caching turns that repetition from the dominant cost into a rounding error. The multipliers differ sharply by vendor, and DeepSeek adds a weekday peak schedule on top. This brief compares the published cache policies for the models in our dataset and shows the arithmetic on a realistic session.

Anthropic cache read
2.5% – 10%
of base input price, model-dependent
DeepSeek off-peak cache hit
$0.003 / M
V4.1 Flash, 2% of the $0.15 input rate
Cache write premium
1.25x – 2x
5-minute vs 1-hour Anthropic TTL

Published cache pricing by model

Sources checked 2026-10-17
ModelBase input / MCache write / MCache read / M
Claude Opus 5.5$4.00$5.00 (1.25x)$0.20 (5%)
Claude Sonnet 5.5$2.00$2.50 (1.25x)$0.10 (5%)
Claude Haiku 5.5$0.10$0.125 (1.25x)$0.01 (10%)
Claude Fable 5.1$10.00$12.50 (1.25x)$0.25 (2.5%)
DeepSeek V4.1 Flash (off-peak)$0.15—$0.003 (2%)
DeepSeek V4.1 Flash (peak)$0.30—$0.006 (2%)
GLM-5.3 (Z.ai direct)$1.40—$0.26
Kimi K3 (direct)$3.00$3.00$0.30 (10%)

Worked example: 20-turn refactor on Claude Sonnet 5.5

Assume a 60,000-token repository context re-sent on every turn, plus 8,000 tokens of new conversation and tool output per turn. That is 1.2M cached-prefix input tokens plus 160,000 fresh input tokens across the session.

No caching
$2.72

1.36M input tokens at $2.00/M, before output tokens.

90% cache hit rate
$0.67

1.08M cache reads at $0.10/M plus 0.28M base-input tokens at $2.00/M.

Saving
64%

Before output tokens and before tool-result trimming. Cache writes are a one-off cost per TTL window.

Three practical rules

  • Keep the prefix stable. Cache keys are prefix-based. Reordering files, timestamps or tool schemas at the top of the prompt invalidates everything below them.
  • Match the TTL to the session. Anthropic's 5-minute cache write costs 1.25x base input and pays back after one read; the 1-hour write costs 2x and needs at least two reads. Terminal agent turns are usually fast enough that the 5-minute tier wins.
  • Do the cheap model first. GLM-5.3 and DeepSeek V4.1 Flash both publish cache-hit prices under 10% of their base input rate. For repository-wide lint or test loops, a cheap cached model plus a frontier model for the final patch is usually cheaper than one frontier model doing everything.
← Back to Models Comparison (39 Models) Check DeepSeek Live Peak Status (/now) →