knowledge-base/wiki/tools/model-routing.md
Hector 8f676acfa7 ingest(youtube): Matthew Berman - 90% less AI costs via Model Routing
- raw: raw/youtube/2026-07-07_berman-model-routing.md
- wiki/tools/model-routing.md (new) — Cost-saving routing patterns
- wiki/architecture/model-routing.md (update) — Berman patterns section
- wiki/index.md — 67. Update with new tool + architecture update
- wiki/log.md — changelog entry
2026-07-07 10:31:37 +02:00

3.9 KiB
Raw Blame History

created updated sources tags
2026-07-07 2026-07-07
youtube/2026-07-07_berman-model-routing.md
tools
model-routing
cost-optimization
routing-patterns
fable
planning-execution-split
cross-model-calling
not-diamond
cursor-auto-mode
copy-paste-routing
coinbase
glm-5.2
gpt-5.5

Model Routing — Cost-Saving Patterns

Source: Matthew Berman — "You NEED to do this right now..." (2026-07-06) See raw: ../../raw/youtube/2026-07-07_berman-model-routing.md

Core Principle

Route every task to the cheapest model that can handle it well. The single most impactful pattern is planning vs. execution separation: use frontier models for architecture/spec design, then delegate code execution to cheaper models.

Cost Comparison

Model Input Cost / M Tokens Output Cost / M Tokens Role
Fable 5 (Anthropic) $10 $50 Planning, Architecture, Specs
GPT 5.5 $2 $6 Code execution
Composer 2.5 $2 $6 Code execution
Claude Sonnet (mid) $3 $15 Code execution
GLM 5.2 (Z.ai) ~$0.08 ~$0.08 Open-source execution layer

Example: Fable-only = $9.50 baseline → Fable + GPT 5.5 routing = $6.48 (68% savings). Total potential with aggressive routing: >90%.

Routing Patterns

1. Manual Copy-Paste (~60% savings)

Developer manually copies code between models. No automation. Works as a proof-of-concept but doesn't scale.

2. Cross-Model-Calling (~70% savings)

One model calls another via API. A script/program orchestrates: Fable designs → API passes spec to GPT 5.5/GLM 5.2 → execution model writes code.

3. Cursor Auto Mode (~75% savings)

Cursor IDE's auto-mode feature routes tasks to the cheapest capable model automatically. Seamless developer experience.

4. Not Diamond (~80% savings)

Dedicated routing layer/API that classifies incoming requests and routes to the optimal model. Adds a routing decision layer between user and model.

5. OpenClaw Smart Model Router (see Skill)

[OpenClaw Smart Model Router skill] — Tier-based routing (5 tiers from simple to frontier). Claims 60-90% savings aligned with Berman's findings.

Enterprise Adoption

Coinbase is implementing model routing on open-source models, specifically GLM 5.2 (Z.ai). This validates:

  • The routing pattern is production-grade, not experimental
  • Chinese open-weight models (GLM 5.2) are viable as the cost-effective execution layer
  • Enterprise security/compliance requirements can be met with routed open-source models

Key Rules

  1. Separate planning from execution — Fable designs the architecture, cheap models write the code
  2. Bounded specs produce reliable cheap execution — when the spec is tight, cheap models stay on track
  3. Output tokens are the cost driver — frontier models charge $50/M output vs $6/M for cheap models
  4. The pattern is simple — the hard part is building the discipline and the harness

Connection to Existing Wiki