<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Toolbit AI</title>
    <description>The latest articles on DEV Community by Toolbit AI (toolbit_ai).</description>
    <link>https://dev.to/toolbit_ai</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F15600%2F3bfeaf77-f366-4f23-90bb-c0d842f9010f.png</url>
      <title>DEV Community: Toolbit AI</title>
      <link>https://dev.to/toolbit_ai</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/toolbit_ai"/>
    <language>en</language>
    <item>
      <title>Prompt Caching Cost Is What Decides Your AI Coding Agent Bill</title>
      <dc:creator>Nirali</dc:creator>
      <pubDate>Mon, 26 Oct 2026 09:59:08 +0000</pubDate>
      <link>https://dev.to/toolbit_ai/prompt-caching-cost-is-what-decides-your-ai-coding-agent-bill-50ad</link>
      <guid>https://dev.to/toolbit_ai/prompt-caching-cost-is-what-decides-your-ai-coding-agent-bill-50ad</guid>
      <description>&lt;p&gt;A coding agent sends your whole conversation back to the model on every single turn. So the price that decides your bill is often the smallest number in the pricing table: the prompt caching cost.&lt;/p&gt;

&lt;p&gt;Max Woolf's post &lt;a href="https://minimaxir.com/2026/10/cheap-llms/" rel="noopener noreferrer"&gt;OpenAI and Anthropic cut their LLM prices by up to 80% within a few months. Why?&lt;/a&gt; is getting a lot of discussion on Hacker News right now. It walks through a summer of price cuts. One line stuck with me. He writes that when you use agents for coding, cache read costs are "the vast majority (96% - 99%) of the total token expenditure." I wanted to see what that means for a real AI coding agent cost, using today's pricing pages instead of launch headlines.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why agents live on cache reads
&lt;/h2&gt;

&lt;p&gt;Every time an agent calls the model, it sends the system prompt, the tool definitions, every file it has read and every message so far. Then it adds a little new content at the end: a tool result, or your next message.&lt;/p&gt;

&lt;p&gt;Providers cache that repeated prefix. Reading it back from the cache is much cheaper than sending it fresh:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;On Claude Opus 5.5, a cache hit costs 5% of the base input price.&lt;/li&gt;
&lt;li&gt;On GPT-6.1 Sol, it's also 5% ($0.10 vs $2.00).&lt;/li&gt;
&lt;li&gt;On Claude Fable 5.1, it's 2.5%.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The new tokens at the end usually get &lt;em&gt;written&lt;/em&gt; to the cache. That costs a bit more than normal input: 1.25x on both Anthropic's default 5-minute cache and OpenAI's default 30-minute cache.&lt;/p&gt;

&lt;h2&gt;
  
  
  LLM API pricing 2026: the numbers that matter
&lt;/h2&gt;

&lt;p&gt;Here is what the official pricing pages say today. Prices are USD per million tokens, standard tier.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Input&lt;/th&gt;
&lt;th&gt;Cache read&lt;/th&gt;
&lt;th&gt;Cache write (default)&lt;/th&gt;
&lt;th&gt;Output&lt;/th&gt;
&lt;th&gt;Note&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Claude Opus 5&lt;/td&gt;
&lt;td&gt;$5.00&lt;/td&gt;
&lt;td&gt;$0.50&lt;/td&gt;
&lt;td&gt;$6.25 (5 min)&lt;/td&gt;
&lt;td&gt;$25&lt;/td&gt;
&lt;td&gt;previous Opus&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Opus 5.5&lt;/td&gt;
&lt;td&gt;$4.00&lt;/td&gt;
&lt;td&gt;$0.20&lt;/td&gt;
&lt;td&gt;$5.00 (5 min)&lt;/td&gt;
&lt;td&gt;$20&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Fable 5.1&lt;/td&gt;
&lt;td&gt;$10.00&lt;/td&gt;
&lt;td&gt;$0.25&lt;/td&gt;
&lt;td&gt;$12.50 (5 min)&lt;/td&gt;
&lt;td&gt;$50&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GPT-5.6 Sol&lt;/td&gt;
&lt;td&gt;$4.00&lt;/td&gt;
&lt;td&gt;$0.40&lt;/td&gt;
&lt;td&gt;$5.00 (30 min)&lt;/td&gt;
&lt;td&gt;$20&lt;/td&gt;
&lt;td&gt;promotional price&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GPT-6.1 Sol&lt;/td&gt;
&lt;td&gt;$2.00&lt;/td&gt;
&lt;td&gt;$0.10&lt;/td&gt;
&lt;td&gt;$2.50 (30 min)&lt;/td&gt;
&lt;td&gt;$10&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gemini 4 Argon&lt;/td&gt;
&lt;td&gt;$2.00&lt;/td&gt;
&lt;td&gt;$0.10&lt;/td&gt;
&lt;td&gt;not listed (implicit caching only)&lt;/td&gt;
&lt;td&gt;$10&lt;/td&gt;
&lt;td&gt;until 30 Nov 2026&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Checked 26 Oct 2026 on the &lt;a href="https://platform.claude.com/docs/en/about-claude/pricing" rel="noopener noreferrer"&gt;Anthropic&lt;/a&gt;, &lt;a href="https://developers.openai.com/api/docs/pricing" rel="noopener noreferrer"&gt;OpenAI&lt;/a&gt; and &lt;a href="https://ai.google.dev/gemini-api/docs/pricing" rel="noopener noreferrer"&gt;Google&lt;/a&gt; pricing pages. OpenAI prices are for prompts up to 272K input tokens.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;(I work at Toolbit, and we keep a running comparison of these prices &lt;a href="https://www.toolbit.ai/blog/opus-5-5-gpt-6-sol-luna-price-war" rel="noopener noreferrer"&gt;here&lt;/a&gt;.)&lt;/p&gt;

&lt;p&gt;Look at Opus 5 to Opus 5.5. Input and output dropped 20%. Cache reads dropped 60%, from $0.50 to $0.20. If you only read the headline, you'd plan for a 20% saving. An agent gets a lot more than that.&lt;/p&gt;

&lt;h2&gt;
  
  
  A worked example: one hour of agent work
&lt;/h2&gt;

&lt;p&gt;These are made-up but realistic assumptions for one coding session:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;160 model calls in about an hour&lt;/li&gt;
&lt;li&gt;the context averages about 100K tokens over the session (it grows, and the agent compacts it now and then), so each call re-reads about 100K cached tokens on average&lt;/li&gt;
&lt;li&gt;about 2K new tokens per call (tool output, your messages), written to the cache&lt;/li&gt;
&lt;li&gt;about 500 output tokens per call (mostly tool calls and short replies)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That adds up to 16M cache-read tokens, 0.32M cache-write tokens and 0.08M output tokens. Cache reads are 97.6% of all tokens, right inside Woolf's range.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Cache reads&lt;/th&gt;
&lt;th&gt;Cache writes&lt;/th&gt;
&lt;th&gt;Output&lt;/th&gt;
&lt;th&gt;Session total&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Opus 5&lt;/td&gt;
&lt;td&gt;$8.00&lt;/td&gt;
&lt;td&gt;$2.00&lt;/td&gt;
&lt;td&gt;$2.00&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$12.00&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Opus 5.5&lt;/td&gt;
&lt;td&gt;$3.20&lt;/td&gt;
&lt;td&gt;$1.60&lt;/td&gt;
&lt;td&gt;$1.60&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$6.40&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GPT-5.6 Sol (promo)&lt;/td&gt;
&lt;td&gt;$6.40&lt;/td&gt;
&lt;td&gt;$1.60&lt;/td&gt;
&lt;td&gt;$1.60&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$9.60&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GPT-6.1 Sol&lt;/td&gt;
&lt;td&gt;$1.60&lt;/td&gt;
&lt;td&gt;$0.80&lt;/td&gt;
&lt;td&gt;$0.80&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$3.20&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gemini 4 Argon (until 30 Nov)&lt;/td&gt;
&lt;td&gt;$1.60&lt;/td&gt;
&lt;td&gt;$0.64*&lt;/td&gt;
&lt;td&gt;$0.80&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$3.04&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gemini 4 Argon (from 1 Dec)&lt;/td&gt;
&lt;td&gt;$3.20&lt;/td&gt;
&lt;td&gt;$1.28*&lt;/td&gt;
&lt;td&gt;$1.60&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$6.08&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Google lists no cache-write price for Argon, so I priced the new tokens at the normal input rate. Its caching is implicit, so your hit rate isn't guaranteed.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Three things stand out.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Opus 5 to 5.5 is a 47% cut for this session, not 20%.&lt;/strong&gt; The 60% cache-read cut does most of the work. A headline-only estimate would have said $9.60. That lines up with Woolf's estimate of a 40-60% total cost cut.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cache reads are the biggest line item, but not 96-99% of the money here.&lt;/strong&gt; They're 97.6% of the tokens. In dollars they're 50-67% of the bill, because writes and output cost far more per token. If your agent writes long answers, output matters more than you'd think.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Caching itself is the real saving.&lt;/strong&gt; Run the same session on Opus 5.5 with no caching and the input alone is 16.32M × $4 = $65.28. That's $66.88 in total, against $6.40 with caching.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faa1ies67vqduffw9z7u2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faa1ies67vqduffw9z7u2.png" alt="Stacked bar chart for an example Claude Opus 5.5 coding session: cache reads are 97.6% of tokens but 50% of the $6.40 cost; cache writes and output are 25% each" width="799" height="411"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Which cuts are temporary
&lt;/h2&gt;

&lt;p&gt;Not every price in that table will still be there in January.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Foye1rx0widl5mu7wtkgf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Foye1rx0widl5mu7wtkgf.png" alt="Timeline of promotional API prices ending: GPT-5.6 Sol promo at least through 21 Nov; Gemini 4 Argon $2/$10 until 30 Nov, then $4/$20; Gemini 3.8 Flash $0.75/$3.75 until 31 Dec, then $1.50/$7.50" width="799" height="434"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GPT-5.6 Sol:&lt;/strong&gt; OpenAI calls its current price promotional, "available at least through November 21, 2026."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gemini 4 Argon:&lt;/strong&gt; $2 input / $10 output through 30 Nov 2026, then $4 / $20 from 1 Dec. Cache reads go from $0.10 to $0.20. The example session doubles.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gemini 3.8 Flash:&lt;/strong&gt; $0.75 / $3.75 through 31 Dec 2026, then $1.50 / $7.50 from 1 Jan 2027.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Claude Sonnet 5&lt;/strong&gt; went the other way. Its $2 / $10 launch price was due to rise to $3 / $15 on 1 Sep 2026. Anthropic made $2 / $10 the standard price instead.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you pick a model on price, put those dates in your calendar.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to estimate your own prompt caching cost
&lt;/h2&gt;

&lt;p&gt;You don't need my assumptions. Your usage logs have the real numbers.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Pull token counts per call.&lt;/strong&gt; Anthropic's API returns &lt;code&gt;cache_read_input_tokens&lt;/code&gt; and &lt;code&gt;cache_creation_input_tokens&lt;/code&gt; in the usage block. OpenAI reports &lt;code&gt;cached_tokens&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Split them into four buckets:&lt;/strong&gt; cache reads, cache writes, uncached input and output.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multiply each bucket by its own price.&lt;/strong&gt; Don't use the input price for everything.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check your hit rate.&lt;/strong&gt; Woolf says the cache tends to be hit around 90-100% of the time, depending on the provider. If yours is much lower, fix that before you switch models.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Watch for cache expiry.&lt;/strong&gt; Anthropic's default cache lives for 5 minutes and is refreshed each time it's read. Step away for a coffee and the next call writes the whole context again. On Opus 5.5, rewriting 100K tokens costs $0.50, while reading them costs $0.02. OpenAI's default is 30 minutes. Both offer longer lifetimes for a higher write price: 1 hour at 2x input on Anthropic, 12 hours at 2.5x on OpenAI.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Then redo the math for the date each temporary price ends.&lt;/p&gt;

&lt;h2&gt;
  
  
  The short version
&lt;/h2&gt;

&lt;p&gt;Input and output prices make the news. For coding agents, the cache-read column and your hit rate decide most of the bill. Cheaper cache reads are why Opus 5.5 costs about half as much as Opus 5 in the example above, even though its headline prices only fell 20%.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;AI tools helped me research and draft this post. I checked every number against the linked sources on 26 Oct 2026.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;What does your agent's split look like? If you've checked your usage logs, I'd love to know how much of your bill is cache reads and how much is output.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>agents</category>
      <category>discuss</category>
    </item>
  </channel>
</rss>
