Home / Writing / AI Systems & Automation
AI Systems & Automation

AI Model Routing: How I Cut Token Costs

October 22, 2026 / 5 min read
AI Model Routing: How I Cut Token Costs

One AI agent of mine burned 245,000 tokens building a single ROAS table. The table itself took a few lines of math. The cost came from somewhere else, and once I saw where, I rewrote how my whole AI team gets work.

This is the practical version of that fix. No theory, no hype. If you run a business with AI tools, this is how to stop paying premium prices for work that does not need a premium brain.

What Actually Went Wrong

I run a small AI operation. Claude Code does the thinking, scripts do the data work, and a couple of Mac Minis in my office run things around the clock. In late September I asked a sub-agent to pull ad data and build a return-on-ad-spend table. Simple job.

The agent did what agents do. It pulled raw API responses, read them into its working memory, pulled more, joined them, read the results again, and carried all of it along for every following step. By the end it had consumed 245K tokens.

Here is the lesson that cost me: the expensive part of AI is almost never the thinking. It is the raw data riding along in context across many steps. Every step re-pays for everything that came before it.

The Fix Part One: Match the Model to the Job

The first change was routing. I stopped using one model for everything and split the work into four lanes:

One detail matters more than it looks. When you launch a sub-agent and do not name a model, it inherits the biggest one. That is exactly how my cold email build quietly ran on Opus for a whole session. Now every sub-agent call must name its model. No exceptions.

The Fix Part Two: Keep Raw Data Out of the Conversation

Routing alone would not have saved that ROAS table. The bigger change was about where data lives.

The rule now: agents never read raw data. A script pulls the numbers, joins them, and does the math in Python. The script prints a summary of two kilobytes or less, or writes a summary file and prints the path. The raw responses go to disk and stay there.

The agent sees the answer, not the haystack. Same table, a fraction of the tokens, and fewer mistakes because there is less noise to get confused by.

The Fix Part Three: Hard Budgets

Every sub-agent now gets a written budget in its prompt: 60,000 tokens and 15 tool calls. A data pull, a report section, or a workflow runs inside that box. Only a true multi-system reconciliation, like a month-end close, is allowed to go to 150,000, and only with my explicit yes.

When a task starts to look like it will blow the budget, the agent stops, writes what it has to disk, and hands back a plan. That one rule prevents the grind where an agent keeps looping because it never learned it was out of room.

A few supporting habits go with it:

What I Would Tell a Business Owner Starting Today

You do not need two Mac Minis to use this. The pattern works at any size.

If you use a single AI tool, the equivalent is simple. Do not paste a spreadsheet into a chat and ask questions about it. Have a small script or a spreadsheet formula do the calculation, then give the AI the result and ask it what to do. You pay for judgment, not for scrolling through rows.

If you are paying for AI usage by the token, this is the difference between a tool that quietly drains your budget and one that stays predictable. I wrote about the broader cost picture in The Real Cost of AI Implementation, and the budget rules here are the follow-up I wish I had written first.

What Does Not Work

What To Do Next

  1. Find your most expensive AI task this week. Check usage and look for the one job that ate the most. That is your 245K moment.
  2. Ask where the raw data sits. If the AI is reading rows, files, or API output directly, move that work into a script or formula.
  3. Write a budget into the prompt. A token ceiling and a tool-call limit, stated in plain words.
  4. Name the model on every delegated task. Strong model for planning, mid-tier for building, light model for checking.
  5. Turn any repeat job into a script. If you did it twice, the third time should cost nothing. A good place to begin is my first AI automation beginner guide.

If you want to see how the full agent setup fits together, start with how I built an AI agent team that runs while I sleep.