Model routing assigns requests to different models according to task demands. Measure quality on your own work—for example, by developer acceptance—and weigh it against cost and latency. Trivial tasks may show little difference between models, while complex tasks can expose large quality gaps. section 9.2.4 section 9.5.4
Route by workflow rather than choosing one model for everything:
- Use lower-cost, faster models where quality differences are small, such as tab completion or a first-pass review. section 9.2.4 section 9.5.4
- Reserve stronger models for tasks where the measured quality advantage matters, such as complex debugging or deep review. section 9.2.4 section 9.5.4
- Treat provider-managed routing as a convenience, not a dependency; keep a fallback selection strategy. section 9.5.4
Two-pass CI review
A first pass with Haiku caught about 60% of review comments at one-tenth the cost; a Sonnet deep pass reduced monthly review costs from $1,400 to $620. But files cleared by Haiku could contain issues that never reach Sonnet. Sample some cleared files for full review and log disagreements before trusting the savings. section 9.2.4
Table 9.1 Change of costs between models
|
Task Type
|
Sonnet
|
Haiku
|
GPT-4.1-mini
|
Model to be selected
|
|
Tab completion
|
94%
|
93%
|
92%
|
Any
(≈)
|
|
Import statements
|
97%
|
96%
|
96%
|
Any
(≈)
|
|
Boilerplate generation
|
91%
|
88%
|
87%
|
Any
(≈)
|
|
Unit test scaffolding
|
89%
|
82%
|
80%
|
Sonnet*
|
|
Inline refactoring
|
90%
|
83%
|
81%
|
Sonnet*
|
|
Function implementation
|
88%
|
74%
|
72%
|
Sonnet
|
|
Complex debugging
|
85%
|
61%
|
58%
|
Sonnet
|
|
Multi-file refactoring
|
82%
|
52%
|
49%
|
Sonnet
|
|
Architecture planning
|
79%
|
41%
|
38%
|
Sonnet
|
Compare reported model acceptance by task type; the results are specific to one team's codebase and workflow. section 9.2.4
Table 9.7 Matching model to the usecase
|
Technique
|
Properties
|
Model
|
|
Interactive pair-programming
|
Latency + Quality
|
Sonnet, agent mode
|
|
Tab completion
|
Cost + Latency
|
Haiku or local model
|
|
Background refactoring
|
Cost + Quality
|
Sonnet, async/batch
|
|
CI review (first pass)
|
Cost + Latency
|
Haiku, immediate
|
|
CI review (deep pass)
|
Cost + Quality
|
Sonnet, batch API
|
|
Test generation
|
Cost + Quality
|
Sonnet, overnight
|
|
Documentation
|
Cost + Latency
|
Haiku, on-demand
|
See example model and tradeoff choices across seven development workflows. section 9.5.4

































