- Raw: raw/blog/2026-07-07_heise-prompt-caching.md (heise+ Paywall, free preview) - Wiki: concepts/prompt-caching.md — KV-Cache-Basis, Prompt-Struktur, Performance-Gewinne (10x lokal / 90% Cloud), Komplementarität zu Model-Routing (Token Level vs Model Level), Cross-Refs - Update: tools/model-routing.md — Cross-Ref zu prompt-caching.md - Update: index.md, log.md (68. Update)
4.1 KiB
| created | updated | sources | tags | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2026-07-07 | 2026-07-07 |
|
|
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
- Separate planning from execution — Fable designs the architecture, cheap models write the code
- Bounded specs produce reliable cheap execution — when the spec is tight, cheap models stay on track
- Output tokens are the cost driver — frontier models charge $50/M output vs $6/M for cheap models
- The pattern is simple — the hard part is building the discipline and the harness
Connection to Existing Wiki
- ../architecture/model-routing.md — OpenClaw's existing routing architecture (Two-Model-Pipeline, Fallback-Chain, GLM 5.2 support)
- ../concepts/llm/chinese-model-cost-routing.md — DeRonin's 87% cost-cut playbook (6 Western→Chinese swaps) complements Berman's patterns with field data
- ../concepts/llm/coding-benchmark-price-performance.md — atomic.chat benchmark: GLM 5.2 is B+ at $0.08 vs Fable 5 A+ at $3.12 (39× cheaper)
- ../concepts/llm/glm-5.2-zai-coding-model.md — Full GLM 5.2 documentation (1M context, MIT license, coding strength)
- ../concepts/llm/fable-5-anthropic.md — Fable 5 documentation (premium frontier)
- ../concepts/agents/subconscious-agent.md — OpenClaw's agent orchestration that could benefit from routing
- ../concepts/llm/llm-model-fusion-ensembles.md — Alternative pattern: parallel model panels instead of sequential routing
- ../concepts/prompt-caching.md — Complementary cost-reduction on the token level: cache stable prompt prefixes instead of routing models. Both can be combined (routed model + cached prefix).