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 Berman登壇者 · Forward Future
チャンネル
Matthew Berman
公開日
2026年7月7日
動画
18:34
読了時間
3 分
スライド
3
原文
英語
YouTube で開く
スクロールすると動画は右下に小さくなって再生を続けます。字幕は閲覧言語に合わせて切り替わります。
閲覧言語2 言語で読めます
この記事はまだ日本語に翻訳されていないため、英語の原文を表示しています。
要約

30 秒でわかる

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.

ポイント

  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.
全文

チャプターごとに整えた全文を読む

文字起こしのみ
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
スライド 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
スライド 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
スライド 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.

同じチャンネルの記事

スライド 6 枚25:50EN
MBMatthew Berman· 2026年10月24日Kimi 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 枚32:20EN
MBMatthew Berman· 2026年10月23日Who 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· 2026年10月21日Sam 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· 2026年10月21日Sam 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 engineeringコーディングエージェント
スライド 5 枚12:14EN
MBMatthew Berman· 2026年10月14日Gemini 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.GeminiBenchmarksコーディングエージェント+1
スライド 5 枚10:36EN
MBMatthew Berman· 2026年10月13日Meta 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.モデルと学習BenchmarksAI cost & performance+1