Skip to content
Margin
ProductThe Meterevery call, meteredThe Estatethe org chart of your agentsThe Money Mapwhere the spend goesThe Parity Gateprove it before it shipsThe Governorthe control loopDocsPricingCompany
Sign inGet set up →
ProductThe MeterThe EstateThe Money MapThe Parity GateThe GovernorDocsPricingCompanyLive demoSign in

Case study two: the switch that cost more

A second set of agents from outside our codebase: a personal agent set: Python, OpenRouter, four agents, a 100-case eval suite, built by our founder for his own use, so not a customer’s. Margin tested candidate models on those evals, switched to none of the cheaper ones, and opened a pull request for the one that scored highest on them. It cost more, and he chose to pay for it.

Captured 2026-10-17 from production

The short version

  • mistral-large-4-0 passed 96 of 100, against 88 for deepseek-v4.1-flash. In the face-off it cost 8.2× as much per task.
  • 10 face-offs ran: 5 cheaper candidates, none switched to; 4 failed before measuring.
  • After the merge, 2 runs passed 94 of 100 and 91 of 100. Run #209 cost 5.0× the old cost per passed case; the other run's recorded bill read low, so it is not quoted.

The agents and their evals

The agents call models through OpenRouter, and their own eval suite grades 100 cases per run. They run on one person’s private life, and the repository is private, so this page names no agent, no suite and no file.

Margin switches to a cheaper model on its own only if it keeps at least 97% of the current pass rate and the result is strong enough to rule out luck. A model that costs more is never switched to automatically: that trade belongs to a person.

Every face-off

Baseline run #151 on deepseek/deepseek-v4.1-flash passed 88 of 100, at $0.000080 per passed case. Every face-off against it is below, including the ones that failed before they measured anything.

RunCandidatePassedPer taskResult
#152deepseek-v4-flash-073185 of 100$0.000037Refused
#153gemma-4-26b-a4b-it86 of 100$0.000025Refused
#154mistral-large-4-0nonenoneFailed: the worker stopped mid-run; its spend could not be read
#155deepseek-v4-flash-0731nonenoneFailed: the two runs graded different units
#156deepseek-v4-flash78 of 100$0.000002Refused
#157gemma-4-26b-a4b-it88 of 100$0.000058Refused
#158mistral-large-4-0nonenoneFailed: the worker stopped mid-run; its spend could not be read
#159mistral-large-4-0nonenoneFailed: the worker stopped mid-run; its spend could not be read
#160mistral-large-4-096 of 100$0.000581Stronger, and dearer
#161ministral-3b-251274 of 100$0.000043Refused

mistral-large-4-0 passed 96 of 100 at $0.000581 per task, against $0.000070 for deepseek-v4.1-flash. Margin opened pull request #6 for it as a draft, and our founder merged it on 2026-10-16.

Every run after the merge

RunOutcomePassedPer passed case
#166measured mistral-large-4-0, mistral-large-4-0-2026100694 of 100not quoted
#209measured mistral-large-4-0-2026100691 of 100$0.000399

Before the switch, run #151 cost $0.000080 per passed case, against the same 100 cases.

Run #166’s recorded bill ($0.019834) is far below what its own metered calls cost ($0.058828): the key’s usage counter read low, a fault since fixed. Its cost is not quoted, rather than quoting the low figure.

That is lower than the face-off’s 8.2× per task. One visible difference is caching: run #209 read 31,488 prompt tokens from the provider’s cache, the face-off 1,968. Pass counts on 100 cases move by a few points from run to run, so read 94 and 91 against 88 as a direction, not a precise gain.

Being tested now

Face-offs against the code on mistral-large-4-0, the switch back included. None of these has been switched to.

RunCandidatePassedPer taskResult
#167deepseek-v4.1-flash88 of 100$0.000087Refused
#168claude-haiku-5.5nonenoneFailed: the candidate left 6 of the 55 cases the current model graded without a verdict, or graded fewer times
#169gpt-6-luna-prononenoneFailed: the worker stopped mid-run; its spend could not be read
#210decision-modelnonenoneFailed: the harnesses ran but none gave a pass or fail
#211claude-haiku-5.5nonenoneFailed: the candidate left 8 of the 55 cases the current model graded without a verdict, or graded fewer times
#212gpt-6-luna-prononenoneFailed: the candidate left 3 of the 55 cases the current model graded without a verdict, or graded fewer times

Switching back to deepseek-v4.1-flash passed 88 of 100, below the bar, so Margin did not recommend undoing the change.

One set of agents and one merged switch show the loop working on code outside Margin’s own repository. They do not show what a larger workload would save or spend.

The first case study, on our own agent, is here. Want the same measurement on your agents? Start here.

Margin

The economic control layer for your AI workforce. Price an outcome and Margin reports what it returns; a cheaper route ships only when quality holds. Neutral across providers, and every number on this site traces back to a run we can show you.

Product

  • The five parts
  • Console
  • Docs
  • Pricing
  • Compare

Company

  • About
  • Build log
  • Security
  • Contact

Resources

  • How it works
  • Case study
  • The ledger
  • Day 0 to 60
  • Essays
  • margin-cost on GitHub
  • margin-meter on PyPI
  • margin-meter on npm

Legal

  • Terms
  • Privacy
  • Cookies
  • DPA
© 2026 MarginBuilt in Chicago41.88° N, 87.63° W