Cognition & OpenRouter on Model Routing: Why Naive Task Routing Fails for Agents
AI Engineer · youtube · 2026-08-07
The Pitfalls of Model Routing
- Small models out of distribution: Alex Atallah (OpenRouter) notes that pushing small models beyond their training distribution causes them to thrash (e.g., calling tools in loops), ultimately costing more than just using a frontier model.
- Static routing is fragile: Walden Yan (Cognition) argues that as an agent session evolves (e.g., from a codebase query to live debugging), the model chosen at the start can easily become stranded.
- Cognition's approach: Keep a frontier model for high-level planning and delegate implementation to cheaper models. This cut costs by 40% while allowing parallel exploration of codebases via sub-agents.
Context & Cache Optimization
- Keeping KV Cache warm: Cognition favors a single sidekick with continuous running context over multiple sub-agents, reducing cached token costs by roughly tenfold.
- The hidden cost of compaction: Yan emphasizes that context compaction should be done for intelligence, not just cost. Compaction forces a cache miss, and model quality falls off a cliff well before the advertised million-token window.
More from coding & agent
- Open Source Collection of 110 Claude Skills for Product Managers — PawelHuryn · 2026-08-07
- Analyzing Tool Calling Errors Can Fix Semi-Silent Failures in Your Harness — morgymcg · 2026-08-07
- Testing 13 Agent Search APIs: Hidden Token Costs Vary by 67x — Patient-Injury-1327 · 2026-08-07
- AI Toolkit Launches MiniMax H3 Distillation Adapter for Faster, Stable Training — ostrisai · 2026-08-07
- BrainOS: Persistent Memory for Multi-Agent Workflows — jacksummer_ · 2026-08-07
- PocketJS Brings Full pi Harness to ESP32: Embedded Devices Can Now Self-Evolve — dotey · 2026-08-07