Model Routing for AI Coding: A Worked Cost Example

Matthew Berman separates planning, implementation and review to explain how different models can fit different tasks.

MBMatthew BermanIntervenant · Forward Future
Chaîne
Matthew Berman
Publié
7 juil. 2026
Vidéo
18:34
Lecture
3 min
Diapositives
3
Original
anglais
Ouvrir sur YouTube
En faisant défiler, la vidéo se réduit en bas à droite et continue. Les sous-titres suivent votre langue de lecture.
Langue de lectureDisponible en 2 langues
Cet article n’est pas encore disponible en français ; il s’affiche dans l’original en anglais.
RÉSUMÉ

En 30 secondes

Matthew Berman describes routing work between more expensive and cheaper models, with a worked token-cost example and a coding workflow. The video is sponsored by GenSpark; he also discloses an investment in Not Diamond. Savings depend on prices, token use, quality and any extra review or retries.

  1. 1Planning and executionBerman recommends using a strong model for research and specifications and a sufficiently capable cheaper model for implementation.
  2. 2Review loopHe sends the resulting pull request back to a stronger model, then feeds review comments to the implementation model.
  3. 3The cost assumptionsHis example assumes 100,000 input and 20,000 output tokens for planning, and 150,000 input and 120,000 output tokens for coding.
  4. 4Illustrative savingsAt the stated rates, planning plus cheaper coding totals $3.02 versus $9.50, roughly 68% less; review and rework are excluded.
  5. 5Manual and automatic routingHe shows copying a specification between tools, a command-line delegation workflow and third-party routing.
  6. 6Beyond codingHe recommends selecting models and effort levels for knowledge work, and cites company examples involving defaults, routing and caching.

À retenir

  1. A stronger model can plan or review while another model implements a sufficiently detailed specification.
  2. In the illustrative API example, routing reduces estimated cost from $9.50 to $3.02, about 68%, before extra review or retry costs.
  3. Subscription quotas do not necessarily translate directly to API token prices.
  4. Compare quality and total cost on your own tasks rather than assuming a particular savings rate.
  5. Berman discloses a GenSpark sponsorship and an investment in Not Diamond.
TEXTE INTÉGRAL

Lire le texte remanié, chapitre par chapitre

Transcription seule
01

Planning, coding and review

Berman introduces model routing and divides a coding task into research, specification, implementation and review.

Model routing means choosing a model appropriate to each task. I use it to reduce AI spending, especially when different phases of a project need different capabilities. The headline savings will vary: measure the full workflow, including retries, review and any quality differences.

I separate planning from execution. Planning involves understanding the codebase, deciding how a feature fits and writing an architecture or specification. I prefer a strong model for that work; a cheaper model may be sufficient to implement a clear plan, though difficult implementation can still require a stronger one.

A routed coding workflow
DIAPOSITIVE 1 / 3A routed coding workflowThe diagram separates research and specification from coding, review and deployment.

My workflow starts with research and questions, then a detailed specification. I hand the specification to a coding model and ask it to create a pull request. Optionally, I ask the stronger model to review the pull request, send its feedback to the coding model and then deploy after the work is ready.

The video is sponsored by GenSpark, an AI workspace Berman presents as combining tools for writing, design, code and media. Any promotional terms and product availability are as described at the time of the video.

02

A token-cost example

He calculates an illustrative cost for one expensive model and compares it with routing implementation to a cheaper model.

For an illustrative API calculation, I assume a more expensive model costs $10 per million input tokens and $50 per million output tokens, while the cheaper model costs $2 and $6 respectively. These are assumptions for the example, not a promise of current pricing or subscription quota consumption.

Token assumptions
DIAPOSITIVE 2 / 3Token assumptionsThe example assigns token counts and per-million-token rates to planning and coding.

The example assumes planning uses 100,000 input and 20,000 output tokens. At the expensive rates, that is $1 for input and $1 for output, or $2 total. Coding uses 150,000 input and 120,000 output tokens; at those same rates, it costs $1.50 plus $6, bringing the overall total to $9.50.

If coding instead uses the cheaper rates with the same token counts, input costs $0.30 and output costs $0.72. Coding costs $1.02, and planning plus coding totals $3.02. The difference is $6.48, about 68% in this example—not the more than 90% mentioned in the opening. The calculation does not include optional review, failed attempts or rework.

The illustrative cost comparison
DIAPOSITIVE 3 / 3The illustrative cost comparisonThe calculation compares $9.50 with $3.02 before review and rework.
03

Practical routing workflows

He demonstrates manual copy-and-paste, command-line delegation and third-party automatic routing. He discloses an investment in a routing company.

One manual approach is to develop a specification in one tool, copy it into another coding tool, and later paste review feedback back to the implementer. I show an example where the implementation runs for about an hour and produces a pull request. Whether this saves money overall depends on the actual work and billing model.

I also demonstrate a skill that lets one command-line agent plan and delegate coding to another. Some third-party coding environments provide automatic model selection; their routing logic and available models differ. Verify the behavior and permissions in the tools and versions you use.

I mention Not Diamond as a company focused on routing and disclose that I am a small investor. I also discuss routing for documents and spreadsheets: choose a model and reasoning effort suited to the task, then evaluate its output rather than always selecting the most expensive option.

04

Knowledge work and enterprise scale

Berman discusses model and effort selection beyond coding, then describes how defaults, routing and caching can affect enterprise spending.

At enterprise scale, I point to a Coinbase example of managing AI costs through cheaper defaults, routing, caching and context management. I speculate about which models handle particular phases, so that division should not be treated as confirmed. The central lesson is to measure quality and total spend against a realistic baseline.

Sur la même chaîne

6 diapositives25:50EN
MBMatthew Berman· 24 oct. 2026Kimi K3.1 Pro Tested: Strong 3D Demos, Uneven Results and Competitive PricingMatthew Berman · Forward FutureMatthew Berman tests the open-weight model on coding, 3D rendering and visual explanations, then compares benchmark results and prices.Open-weight modelsBenchmarksAI cost & performance+1
2 diapositives32:20EN
MBMatthew Berman· 23 oct. 2026Who Is Local AI For? The Costs, Trade-offs and a Hybrid FutureMatthew Berman · Forward FutureMatthew Berman weighs data control and independence against hardware cost, setup complexity and inference speed.Local inferenceOpen-weight modelsAI cost & performance+1
45:08EN
MBMatthew Berman· 21 oct. 2026Sam Altman on AI Discovery, Consciousness, Compute and a Human-Centered FutureMatthew Berman, Sam Altman · Forward FutureIn a conversation with Matthew Berman, Altman discusses scientific progress, personal assistants, recursive self-improvement and the importance of human agency.AI for sciencePersonal agentsConsciousness+2
0:32EN
MBMatthew Berman· 21 oct. 2026Sam Altman on the Continuing Demand for Software WorkSam Altman, Matthew Berman · OpenAIIn a short interview excerpt, Altman says demand for software may be larger than expected even as AI changes how it is made.Future of WorkSoftware engineeringAgents de code
5 diapositives12:14EN
MBMatthew Berman· 14 oct. 2026Gemini 4 Argon Tested: 3D Demos, a Spreadsheet Prototype and Benchmark ResultsMatthew Berman · Forward FutureMatthew Berman tests Google’s model on games and visual projects, then compares reported coding and agent benchmarks.GeminiBenchmarksAgents de code+1
5 diapositives10:36EN
MBMatthew Berman· 13 oct. 2026Meta Muse Wonder Tested: Strong Benchmarks, Mixed Demos and Quota FrictionMatthew Berman · Forward FutureMatthew Berman tests Meta’s models on browser demos and reviews their published benchmark scores, availability and cost.Modèles et entraînementBenchmarksAI cost & performance+1