<?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: AICostbudget.com</title>
    <description>The latest articles on DEV Community by AICostbudget.com (@linqiangmax).</description>
    <link>https://dev.to/linqiangmax</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%2F4215637%2F28f47195-4309-43f7-a9bc-9754ceffe82c.jpg</url>
      <title>DEV Community: AICostbudget.com</title>
      <link>https://dev.to/linqiangmax</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/linqiangmax"/>
    <language>en</language>
    <item>
      <title>I paid 9x more for the “smarter” LLM. It got exactly the same answers right.</title>
      <dc:creator>AICostbudget.com</dc:creator>
      <pubDate>Thu, 29 Oct 2026 15:53:31 +0000</pubDate>
      <link>https://dev.to/linqiangmax/i-paid-9x-more-for-the-smarter-llm-it-got-exactly-the-same-answers-right-1hdk</link>
      <guid>https://dev.to/linqiangmax/i-paid-9x-more-for-the-smarter-llm-it-got-exactly-the-same-answers-right-1hdk</guid>
      <description>&lt;p&gt;Most of us pick an LLM by looking at a pricing table: dollars per million input tokens, dollars per million output tokens. Then we pick the model that sounds smart enough and hope the bill is fine.&lt;/p&gt;

&lt;p&gt;That number answers the wrong question. You don't pay for tokens. You pay for &lt;strong&gt;a task that came out right&lt;/strong&gt;, plus everything it took to get there:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the retries when the first answer failed your check,&lt;/li&gt;
&lt;li&gt;the reasoning tokens a "thinking" model writes and you never see,&lt;/li&gt;
&lt;li&gt;the answers that come back empty or malformed, which you pay for anyway.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So I built a small open benchmark that measures the number you actually pay:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cost per successful task = everything you paid for all attempts ÷ results that passed the check
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;16 tasks that look like production work&lt;/strong&gt;: invoice field extraction, receipt images, strict JSON for a schema, text-to-SQL over three SQLite databases, intent classification, small bug fixes, tool calling, Q&amp;amp;A over a ~30K-token handbook sent as a cacheable prefix, contact-record normalisation, and regex from examples. Ten are "standard" and six are a harder tier.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Every check is code, not an LLM judge.&lt;/strong&gt; Extracted fields are compared after normalisation, SQL is run and its result set compared, bug fixes run against hidden unit tests, regexes are tested on hidden strings.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Up to 3 attempts per item.&lt;/strong&gt; When a check fails, the validator's reason goes back to the model as the next message, the way a real app would retry.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Provider defaults.&lt;/strong&gt; No temperature, no reasoning-effort setting, no fallbacks, because that's what most people run.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Every input is generated from a fixed seed&lt;/strong&gt; by code in the repo (invented names, companies, databases), so none of it can be in a training set, and &lt;code&gt;generate.py --check&lt;/code&gt; proves the data matches byte for byte.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prices come from an open pricing dataset&lt;/strong&gt;, pinned to a commit, so every cost in the report can be traced to an official price page.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  First run: DeepSeek flash vs DeepSeek V4 Pro
&lt;/h2&gt;

&lt;p&gt;I ran both models on every text task, both tiers: 720 graded answers per model. The image task was skipped because neither model takes images.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Per 1M successful tasks (list price)&lt;/th&gt;
&lt;th&gt;deepseek-flash&lt;/th&gt;
&lt;th&gt;deepseek-v4-pro&lt;/th&gt;
&lt;th&gt;V4 Pro ÷ flash&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Standard tier (9 tasks)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$347&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$1,698&lt;/td&gt;
&lt;td&gt;4.9x&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hard tier (6 tasks)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$596&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$5,478&lt;/td&gt;
&lt;td&gt;9.2x&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Success within 3 attempts&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Both models eventually got &lt;strong&gt;every&lt;/strong&gt; item right. The flagship cost 4.9x as much per success on everyday tasks and 9.2x on the hard ones.&lt;/p&gt;

&lt;p&gt;Per task, the gap ranged from 2.3x (intent classification, where answers are a single label) to 14x (hard regex):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Hard-tier task&lt;/th&gt;
&lt;th&gt;flash $/success&lt;/th&gt;
&lt;th&gt;V4 Pro $/success&lt;/th&gt;
&lt;th&gt;ratio&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Invoice extraction (10 fields, VAT, deposits)&lt;/td&gt;
&lt;td&gt;$0.00079&lt;/td&gt;
&lt;td&gt;$0.00667&lt;/td&gt;
&lt;td&gt;8.4x&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Strict JSON (nested schema, unit conversions)&lt;/td&gt;
&lt;td&gt;$0.00057&lt;/td&gt;
&lt;td&gt;$0.00281&lt;/td&gt;
&lt;td&gt;4.9x&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Text-to-SQL (window functions, HAVING)&lt;/td&gt;
&lt;td&gt;$0.00053&lt;/td&gt;
&lt;td&gt;$0.00505&lt;/td&gt;
&lt;td&gt;9.5x&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tool calling (relative dates, decoys)&lt;/td&gt;
&lt;td&gt;$0.00024&lt;/td&gt;
&lt;td&gt;$0.00117&lt;/td&gt;
&lt;td&gt;4.9x&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Long-document multi-hop QA&lt;/td&gt;
&lt;td&gt;$0.00027&lt;/td&gt;
&lt;td&gt;$0.00150&lt;/td&gt;
&lt;td&gt;5.6x&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Regex (leap years, backreferences, lookaheads)&lt;/td&gt;
&lt;td&gt;$0.00129&lt;/td&gt;
&lt;td&gt;$0.01800&lt;/td&gt;
&lt;td&gt;14.0x&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Where the money goes
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Hidden reasoning.&lt;/strong&gt; V4 Pro's output price is 3.3x flash's. If that were the whole story, it would cost about 3–4x per task. It cost up to 9x, because it also writes far more output: 1.3x to 4.3x as many tokens per attempt on the hard tier, almost all of it reasoning. On the hardest regex tasks V4 Pro averaged 4,294 output tokens per attempt against flash's 1,003. The harder the task, the more it "thinks", and the wider the gap.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Paying for nothing.&lt;/strong&gt; Three times, V4 Pro reasoned until it hit the 16,000-token output limit and returned an empty answer. Every one of those tokens was billed. The retry passed, and was billed again.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cheap retries.&lt;/strong&gt; Flash made three genuine mistakes in 720 answers: an empty reply on a bug fix, a phone-number field, and a regex that missed one case. Each was fixed by a single retry with the validator's feedback. A retry on flash costs less than a first attempt on V4 Pro.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Caching does the heavy lifting on long prompts.&lt;/strong&gt; The long-document task sends a ~30K-token handbook with every question. About 98% of that input was served from DeepSeek's cache, so it cost about the same per answer as the short-prompt tasks.&lt;/p&gt;

&lt;h2&gt;
  
  
  The benchmark had bugs too
&lt;/h2&gt;

&lt;p&gt;Running real models against a new benchmark finds problems in the benchmark. I fixed them before publishing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The first run surfaced ground-truth errors: an invoice layout where the "No." label could be read as part of the invoice number, and three product descriptions that fit two categories. I regenerated the data and re-ran.&lt;/li&gt;
&lt;li&gt;The tool-calling hard tier failed on &lt;em&gt;both&lt;/em&gt; models at first. The cause was the runner, not the models: it decided how to grade a reply by checking whether the task id was exactly &lt;code&gt;tool_calling&lt;/code&gt;, so the hard variant was graded as plain text. It now reads a &lt;code&gt;REPLY&lt;/code&gt; attribute on the task, and the self-test fails if a task that sends tools doesn't set it.&lt;/li&gt;
&lt;li&gt;Three questions turned out ambiguous: the SQL databases contain two different people with the same name, and the questions didn't say whether to list that name once or twice; and one tool-calling request asked about "this coming Thursday" on a Thursday. Those were reworded. The expected answers didn't change.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Of the nine first-attempt failures across both models, three were genuine model errors, three were the output-limit cut-offs, and three were these ambiguous questions.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this does &lt;em&gt;not&lt;/em&gt; show
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;That small models are always enough.&lt;/strong&gt; This is one provider, synthetic tasks, and one run per model. On your workload the flagship may well earn its price.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;That these numbers transfer to other providers.&lt;/strong&gt; That's the next thing worth measuring, which is why the runner supports OpenAI, Anthropic and Gemini too.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What you'll actually be billed.&lt;/strong&gt; Costs here are at DeepSeek's peak list price so the two models compare like for like. I ran off-peak, where DeepSeek bills half, and the console charged about 46% of the logged list cost. The whole experiment, smoke tests included, cost about $1.40.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The point isn't "always use the cheap model". It's that &lt;strong&gt;price per token tells you almost nothing about cost per result&lt;/strong&gt;, and measuring the real number is cheap.&lt;/p&gt;

&lt;h2&gt;
  
  
  Run it on your own models
&lt;/h2&gt;

&lt;p&gt;Python 3.11+, bring your own keys. Nothing is sent anywhere except to the providers you choose.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/aicostbudget/llm-cost-per-task-benchmark
&lt;span class="nb"&gt;cd &lt;/span&gt;llm-cost-per-task-benchmark
pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; requirements.txt &lt;span class="nt"&gt;-r&lt;/span&gt; requirements-runner.txt

python runner.py &lt;span class="nt"&gt;--estimate&lt;/span&gt;                      &lt;span class="c"&gt;# what a run would cost, no API calls&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;ANTHROPIC_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;...                     &lt;span class="c"&gt;# only the providers you use&lt;/span&gt;
python runner.py &lt;span class="nt"&gt;--run&lt;/span&gt; &lt;span class="nt"&gt;--models&lt;/span&gt; claude-haiku-5-5 &lt;span class="nt"&gt;--limit&lt;/span&gt; 1 &lt;span class="nt"&gt;--budget&lt;/span&gt; 1   &lt;span class="c"&gt;# smoke test&lt;/span&gt;
python runner.py &lt;span class="nt"&gt;--run&lt;/span&gt; &lt;span class="nt"&gt;--tier&lt;/span&gt; hard &lt;span class="nt"&gt;--models&lt;/span&gt; claude-haiku-5-5 &lt;span class="nt"&gt;--budget&lt;/span&gt; 3 &lt;span class="nt"&gt;--run-id&lt;/span&gt; haiku-hard
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;--budget&lt;/code&gt; is a hard cap: the runner stops before any attempt that could push spend past it, and the same &lt;code&gt;--run-id&lt;/code&gt; resumes where it stopped. No key at all? The Gemini free tier works with &lt;code&gt;--pace&lt;/code&gt; to stay under the rate limit.&lt;/p&gt;

&lt;p&gt;Each run writes a report with the cost per success, the retry rate and the cached-input share. You can paste those into a &lt;a href="https://aicostbudget.com/en/model-switch-cost-calculator?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=cost-per-task-benchmark&amp;amp;utm_content=devto-2026-10" rel="noopener noreferrer"&gt;model switch cost calculator&lt;/a&gt; to see what a switch would save per month (I built that too).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Repo: &lt;a href="https://github.com/aicostbudget/llm-cost-per-task-benchmark" rel="noopener noreferrer"&gt;https://github.com/aicostbudget/llm-cost-per-task-benchmark&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Full results and caveats: &lt;a href="https://github.com/aicostbudget/llm-cost-per-task-benchmark/blob/main/results/2026-10-29-deepseek.md" rel="noopener noreferrer"&gt;results/2026-10-29-deepseek.md&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you run it on GPT, Claude or Gemini models, I'd love to add your results. Post them in &lt;a href="https://github.com/aicostbudget/llm-cost-per-task-benchmark/issues/1" rel="noopener noreferrer"&gt;issue #1&lt;/a&gt;. And if you have a task where you're sure the flagship clearly wins, tell me in &lt;a href="https://github.com/aicostbudget/llm-cost-per-task-benchmark/issues/2" rel="noopener noreferrer"&gt;issue #2&lt;/a&gt; and I'll build it.&lt;/p&gt;

</description>
      <category>llm</category>
      <category>ai</category>
      <category>opensource</category>
      <category>benchmark</category>
    </item>
  </channel>
</rss>
