<?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: Andrey Altrouter</title>
    <description>The latest articles on DEV Community by Andrey Altrouter (@altrouter).</description>
    <link>https://dev.to/altrouter</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%2Fuser%2Fprofile_image%2F4074301%2F0600ae16-ff26-459e-8ddd-ace73be1a5a1.png</url>
      <title>DEV Community: Andrey Altrouter</title>
      <link>https://dev.to/altrouter</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/altrouter"/>
    <language>en</language>
    <item>
      <title>Your model benchmark measures everything except the bill</title>
      <dc:creator>Andrey Altrouter</dc:creator>
      <pubDate>Wed, 12 Aug 2026 11:30:17 +0000</pubDate>
      <link>https://dev.to/altrouter/your-model-benchmark-measures-everything-except-the-bill-4i8o</link>
      <guid>https://dev.to/altrouter/your-model-benchmark-measures-everything-except-the-bill-4i8o</guid>
      <description>&lt;p&gt;Every model benchmark I read ranks the same two things: how good the output was, and sometimes how many tokens it took. Almost none of them print the number you actually get charged for.&lt;/p&gt;

&lt;p&gt;That gap matters, because the two rankings are not the same list. A model can win on quality, lose on tokens, and still be the cheapest way to finish your task — or the opposite. You cannot tell which without doing the multiplication yourself.&lt;/p&gt;

&lt;p&gt;Here is the multiplication.&lt;/p&gt;

&lt;h2&gt;
  
  
  The formula
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cost = (input_tokens / 1M) × price_in + (output_tokens / 1M) × price_out
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is the whole thing. Two numbers from the benchmark, two numbers from the vendor's pricing page. The reason it is worth writing down is that every term in it moves independently, and benchmarks only ever report the first two.&lt;/p&gt;

&lt;h2&gt;
  
  
  A worked example
&lt;/h2&gt;

&lt;p&gt;Take one coding task. Say it consumes &lt;strong&gt;40K input tokens and 12K output tokens&lt;/strong&gt; — the shape of a real agent run with a few files in context and a couple of iterations. These numbers are an assumption for the example, not a measurement; substitute your own from your logs.&lt;/p&gt;

&lt;p&gt;Vendor list prices per 1M tokens, as of August 2026:&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;in $&lt;/th&gt;
&lt;th&gt;out $&lt;/th&gt;
&lt;th&gt;Cost of one task&lt;/th&gt;
&lt;th&gt;100 tasks&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Claude Opus 4.5&lt;/td&gt;
&lt;td&gt;5.00&lt;/td&gt;
&lt;td&gt;25.00&lt;/td&gt;
&lt;td&gt;$0.500&lt;/td&gt;
&lt;td&gt;$50.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GPT-5.6&lt;/td&gt;
&lt;td&gt;2.50&lt;/td&gt;
&lt;td&gt;15.00&lt;/td&gt;
&lt;td&gt;$0.280&lt;/td&gt;
&lt;td&gt;$28.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Sonnet 5&lt;/td&gt;
&lt;td&gt;2.00&lt;/td&gt;
&lt;td&gt;10.00&lt;/td&gt;
&lt;td&gt;$0.200&lt;/td&gt;
&lt;td&gt;$20.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Grok 4.5&lt;/td&gt;
&lt;td&gt;2.00&lt;/td&gt;
&lt;td&gt;6.00&lt;/td&gt;
&lt;td&gt;$0.152&lt;/td&gt;
&lt;td&gt;$15.20&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Haiku 4.5&lt;/td&gt;
&lt;td&gt;1.00&lt;/td&gt;
&lt;td&gt;5.00&lt;/td&gt;
&lt;td&gt;$0.100&lt;/td&gt;
&lt;td&gt;$10.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gemini 3 Flash&lt;/td&gt;
&lt;td&gt;0.50&lt;/td&gt;
&lt;td&gt;3.00&lt;/td&gt;
&lt;td&gt;$0.056&lt;/td&gt;
&lt;td&gt;$5.60&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Nine times between the top and the bottom row. No leaderboard shows you that spread, because no leaderboard multiplies.&lt;/p&gt;

&lt;h2&gt;
  
  
  The trap in the cheap column
&lt;/h2&gt;

&lt;p&gt;Now the part that makes the table dangerous if you read it naively.&lt;/p&gt;

&lt;p&gt;Token counts are not a property of the task. They are a property of the &lt;strong&gt;model on&lt;/strong&gt; that task. A weaker model that misunderstands the requirement, retries twice, re-reads the whole file and asks a clarifying question burns three or four times the tokens of a model that gets it in one pass.&lt;/p&gt;

&lt;p&gt;Run the arithmetic again. Haiku 4.5 is five times cheaper per token than Sonnet 5. If it needs four times the tokens to converge, one task costs $0.40 instead of $0.10 — and Sonnet, at $0.20, is now &lt;strong&gt;twice as cheap&lt;/strong&gt; as the "cheap" model.&lt;/p&gt;

&lt;p&gt;This is why "just use a smaller model" is advice, not a strategy. The only way to know is to log input and output tokens per task, per model, and multiply. Both numbers, separately: output usually dominates the bill, and it is the one that explodes when a model starts thinking out loud.&lt;/p&gt;

&lt;p&gt;Same reason time-to-finish deserves a column. A model that produces correct code after forty minutes of tool calls is not free just because each call is small.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to actually do
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Log tokens per task, split into input and output.&lt;/strong&gt; If your framework does not expose them, most gateways do. Without the split you cannot price anything, because in/out prices differ by 3–10×.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Exclude cache reads or price them separately.&lt;/strong&gt; Cached input is usually an order of magnitude cheaper; mixing it in makes your numbers look better than reality.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Price your top three candidates on your own tasks&lt;/strong&gt;, not on a public benchmark's tasks. The token ratio is workload-specific — long-context refactoring and short algorithmic prompts produce completely different bills.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recompute quarterly.&lt;/strong&gt; Model prices move, and new models land every few weeks at a different point on the curve.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Do this once and the model choice stops being a debate about vibes. It becomes a number with a currency symbol on it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the price itself is negotiable
&lt;/h2&gt;

&lt;p&gt;One more term in that formula is worth attention, and it is the one everybody treats as fixed: &lt;code&gt;price_in&lt;/code&gt; and &lt;code&gt;price_out&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Vendor list price is not the only price those models sell at. I work on &lt;a href="https://altrouter.ai" rel="noopener noreferrer"&gt;altrouter.ai&lt;/a&gt;, a gateway that resells the same models below the vendor's list — Claude Opus 4.5 at $3.74 / $18.75 per 1M against the official $5.00 / $25.00, Sonnet 5 at $1.69 / $8.50 against $2.00 / $10.00, and so on across 44 models on an OpenAI-compatible API. The discount is a standing price, shown next to the official one on every model page, not an intro offer.&lt;/p&gt;

&lt;p&gt;Plug it into the same example: the 100-task run on Opus 4.5 costs $37.44 instead of $50.00. Same weights, same tokens, same code — only the third and fourth term of the formula changed.&lt;/p&gt;

&lt;p&gt;I am obviously not a neutral party on that last paragraph, so treat it the way you should treat the rest of this post: as arithmetic you can check. The formula is public, the list prices are public, and your token counts are in your own logs.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>programming</category>
      <category>cost</category>
    </item>
  </channel>
</rss>
