agenticoutputs
Orchestration & Infrastructure

Model Routing: Cost-Optimized Orchestration

Frontier models are powerful but expensive. Most production tasks (like data extraction, simple validation, or summarization) do not require a massive frontier model. Model routing intercepts prompts, classifies their complexity, and dispatches them to the cheapest capable model in your inventory.

INPUT TASK Raw Prompt ROUTER Intent classifier schema match SIMPLE LOGIC REASON LIGHT TIER (Flash/8B) Cost: 1x (e.g. Gemini 3.6 Flash / GPT-5.6 Luna) MEDIUM TIER (Pro/70B) Cost: 10x (e.g. GPT-5.6 Terra / Gemini 3.5 Pro) FRONTIER TIER (Fable/Sol) Cost: 40x (e.g. Claude Fable 5 / GPT-5.6 Sol)

Multi-tier model routing: Incoming tasks are analyzed by a lightweight local classifier. Simple text-manipulation calls bypass expensive reasoning networks entirely, preserving budget.

01 Task Triage Matrix

Matching prompt intent to the appropriate model classification level.

Tier 01 // Light

Simple Extraction

Best for: Entity extraction, sentiment checks, text summaries, data cleaning, or formatting JSON.

Rationale: These tasks require pattern recognition, not logic reasoning. A lightweight model (e.g., GPT-5.6 Luna or Gemini 3.6 Flash) completes this at a tiny fraction of the cost.

Tier 02 // Medium

Intermediate Logic

Best for: Multi-document comparisons, simple code refactoring, basic code reviews, or semantic search processing.

Rationale: Requires general language comprehension and contextual reasoning. Uses mid-tier models (GPT-5.6 Terra or Gemini 3.5 Pro) to balance output quality and speed.

Tier 03 // Frontier

Complex Reasoning

Best for: Mathematical proofs, architectural planning, complex multi-file edits, or nested tool-execution loops.

Rationale: Requires deep abstract reasoning and high command precision. Reserved for frontier models (Claude Fable 5 or GPT-5.6 Sol).

02 Escalation Strategy

Programmatic validation checks prevent silent output degradation.

Instead of guessing complexity upfront, implement a programmatic Escalation Loop. Start with the cheapest model, check the output with an automated linter or validator, and escalate to a larger model only if validation fails.

Programmatic Validation Flow

1. **Dispatch:** Send user request to the Light model (Tier 1).
2. **Lint:** Run output against a programmatic JSON schema validator or compiler check.
3. **Evaluate:** If validation succeeds, return output instantly (saving 95%).
4. **Escalate:** If validation fails, route the identical prompt to the Frontier model (Tier 3) to execute.

Axiom: Code/JSON validation can be automated; raw quality checks use routing classifiers.

Economic Impact Analysis

Strategy Tokens Input Est. Cost / 10k runs
All Frontier Sol / Fable (22M) $90.00
All Light Flash 3.6 (22M) $2.10 (97% savings)
Escalation Loop* Hybrid $6.50 (92% savings)
*Assumes 5% of tasks fail Tier 1 validation and require Tier 3 execution.
03 Infrastructure Axioms

Rules for building robust routing pipelines.

Don't Hammer with Microscopes

Using a frontier model to parse CSV outputs or count characters burns budget. Always delegate structural text manipulation to lightweight models.

Fail Fast, Escalate Programmatically

If output format constraints are critical, validate programmatically (e.g. JSON schema validator). Let the compiler handle intent verification.

Keep Classifier Overhead Low

A routing classifier should use simple regex keywords or local, tiny models (like 1B parameters or structured schemas) so the classification doesn't cost more than the task itself.

Cache and Reuse Prefixes

Combine model routing with prompt caching. Route repeated requests with identical system instructions to matched cached slots to collapse inputs.

04 External Resources

Authoritative articles and frameworks on model routing.

"Cost-aware orchestration is the bridge between AI prototypes and profitable products."

01

Frontier reasoning is a resource. Don't waste it on simple text summarization or entity classification tasks.

02

Automate intent triaging. Implement low-cost local checks or strict schema routes to match intent to model scale.