CCode Story: Insights from Startup Tech Leaders
← All frameworks
StrategyTim Lidman

Cost-Aware Multi-Model Routing

Match each structured task to the least costly model that can solve it

Difficulty
Expert
Time to result
~ongoing to results
Steps
6
Confidence
96%

The routing framework begins by extracting structured context about the user's problem and desired outcome. The system then decides whether the task needs a frontier reasoning model or can be handled by a faster, less expensive model. Clyde uses a multi-model architecture and reviews model selection weekly, keeping the optimization burden away from users. The economic mechanism is straightforward: reserve costly capability for tasks that need it while measuring whether cheaper models preserve acceptable outcomes. The framework also adds resilience by testing open-weight models, identifying which parts of the product they could handle, and considering fine-tuning where dependence on frontier providers becomes risky. This makes model choice a continuously managed unit-economics decision rather than a fixed technical preference.

Origin

Extracted from Code Story: Insights from Startup Tech Leaders, where Tim Lidman connected token scarcity to Clyde's multi-model architecture and open-weight experiments.

Core principles

  • 01Extract the task context before choosing a model
  • 02Use expensive reasoning only when the problem requires it
  • 03Hide routing complexity from the user
  • 04Re-optimize model selection as capabilities and economics change
  • 05Test open-weight models as a resilience option

How to run it

  1. 1

    Extract structured context

    Ask for the problem, intended outcome, and relevant constraints in a structured way before invoking a model.

    Pro tip Make context collection part of the product experience rather than asking users to engineer prompts.

  2. 2

    Classify the task

    Determine the level of reasoning and capability the problem requires.

    Watch out Do not default every task to the most expensive model.

  3. 3

    Route to a model tier

    Send the task to the least costly available model that can meet its quality requirement.

    Pro tip Keep the routing choice invisible unless the user needs to know it.

  4. 4

    Measure quality and economics

    Compare output quality with token usage and cost for each routed task class.

    Watch out Cost reduction that breaks the user's outcome is not optimization.

  5. 5

    Re-optimize weekly

    Review routing as model capability, pricing, and product demand change. Update the model assignment when evidence supports it.

    Pro tip Treat routing as a living product system rather than a one-time architecture choice.

  6. 6

    Develop an open-weight fallback

    Test which use cases open-weight models can support and whether focused fine-tuning could reduce reliance on frontier models.

    Watch out Do not assume an open-weight model can cover the entire product without use-case testing.

In the wild

Clyde's background model selection

Clyde first extracts context about what a user is trying to do and the problem to solve. Its backend then decides whether the task needs an expensive reasoning model or can use a lighter model. The company reviews this selection weekly and experiments with open-weight models to learn which use cases could operate without frontier models.

→ Users avoid model-selection complexity while Clyde can manage token economics across different task types.

Common mistakes

Unleashing premium models on every task

Lidman highlighted CIO concern about expensive reasoning models being used by people who do not know how to optimize them.

Hard-coding model choice

Model capabilities and economics change, so Clyde reviews and optimizes model selection every week.

Is it for you?

Best for

It is best for AI products with varied tasks, meaningful token costs, and access to multiple model tiers.

Not ideal for

It is not ideal for a single narrow task where one inexpensive model already meets every quality requirement.

From the transcript

“Clyde extracts the context from you in terms of what you're trying to do the problem you're trying to solve in this sort of very…”

Tim Lidman · 17:11

“our multi-olem architecture that's going on in the back end allows us to on a weekly basis optimize how we're doing our model selection and…”

Tim Lidman · 17:49

“What part of our use case could handle that?”

Tim Lidman · 18:55

From the episode

S12 Bonus: The Microsoft File Trap: Moving Beyond Manual PowerPoint and Excel Workflows to Build an AI-Native "Consulting" Layer with Tim Lidman, Co-Founder & CEO of Clyde AI

Tim Lidman

→