Skip to content

Cascade Routing: Cut Your API Costs by 66%

June 11, 2026

Most teams use one model for everything. They default to Claude Opus or GPT-5 for every task, which means they are paying premium prices for simple work.

The Price Range

ModelInput ($/M)Output ($/M)
Gemini 2.5 Flash$0.15$0.60
DeepSeek V3$0.27$1.10
Claude Sonnet 4$3.00$15.00
Claude Opus 4$15.00$75.00

That is a 100x range between the cheapest and most expensive.

The Cascade Pattern

Route different steps to different models. Use cheap models for simple retrieval and formatting. Use expensive models only for complex reasoning.

Retrieve context -> Gemini Flash ($0.15/$0.60)
Analyze data     -> Claude Sonnet ($3/$15)
Make decision    -> Claude Opus ($15/$75)
Format output    -> Gemini Flash ($0.15/$0.60)

The Savings

PatternCost/TaskSavings
All Opus$2.50Baseline
Cascade$0.8566%
All Sonnet$0.5080% (but quality loss on complex steps)

Implementation

python
def route_task(task_complexity: str) -> str:
    if task_complexity == "retrieval":
        return "gemini-2.5-flash"
    elif task_complexity == "analysis":
        return "claude-sonnet-4"
    elif task_complexity == "decision":
        return "claude-opus-4"
    elif task_complexity == "formatting":
        return "gemini-2.5-flash"

When Not to Cascade

If your task is a single critical decision, use the best model. Cascade routing shines when you have a pipeline of steps with varying complexity, which is most real-world agent systems.


From Module 6 of the Agentic Engineering Course. The full module includes a cost optimization lab with working code.

Last updated:

FDSA Agency — Agentic Engineering Course. Part of the fdsa.ai orchestration platform.