Adaptive Model Routing
Not every task needs the most powerful model. Groove's adaptive model routing matches agents to the right model tier based on their role and the complexity of their work, saving significant cost without sacrificing quality.
The Cost Problem
Using Opus for every task is expensive. A simple documentation update or test fix does not need a 1M-context frontier model. But manually choosing models for each agent is tedious and error-prone — you often do not know the true complexity until the work starts.
Groove automates this decision with a routing system that learns from agent activity.
How Routing Works
The routing pipeline combines two inputs:
- Role hints — a static mapping from roles to expected complexity tiers
- Classifier — a dynamic assessment based on actual agent activity
These produce a final tier assignment (Heavy, Medium, or Light) that maps to a specific model.
Three Routing Modes
Fixed
You choose the model manually per agent. No automatic routing. Use this when you know exactly which model you want.
Auto
Groove selects the model based on role hints and the classifier. The model can change during the session if the classifier detects a complexity shift.
Auto-with-Floor
Same as Auto, but with a minimum tier. For example, you can set a floor of Medium so that an agent never drops below Sonnet, even if the classifier rates its work as light.
Recommended
Auto mode is the default and works well for most workflows. Use Auto-with-Floor when you have agents doing work that looks simple but requires deep reasoning.
Role Hints
The ROLE_HINTS map provides starting-point tier assignments based on role:
| Role | Default Tier | Rationale |
|---|---|---|
| Planner | Light | Planning and analysis, no code execution |
| Docs | Light | Documentation writing |
| Testing | Medium | Test logic requires moderate reasoning |
| Backend | Medium | Standard server-side development |
| Frontend | Medium | UI work with moderate complexity |
| DevOps | Medium | Infrastructure and CI/CD |
| Fullstack | Heavy | Cross-cutting features need deep context |
These are starting points. The classifier adjusts in real-time based on what the agent actually does.
The Classifier
The classifier watches a sliding window of the 50 most recent events from each agent and tracks:
- Tool call complexity (file reads vs. multi-file refactors)
- Error rates and recovery patterns
- Scope of changes (single file vs. cross-module)
- Task duration and iteration count
Based on these signals, it assigns a complexity rating: light, medium, or heavy. This rating can override the role hint when actual work diverges from expectations.
Cost Tracking
Groove logs the cost of every agent session, broken down by model tier:
| Tier | Approximate Cost | Typical Models |
|---|---|---|
| Heavy | $0.045 per 1K tokens | Opus, o3 |
| Medium | $0.009 per 1K tokens | Sonnet, o4-mini |
| Light | $0.002 per 1K tokens | Haiku, Flash |
The Token Dashboard in the GUI shows aggregate spend, per-agent breakdown, and how much routing has saved compared to running everything on the heavy tier.
Savings Add Up
A typical 4-agent session running for 2 hours can save 40-60% on token costs with Auto routing compared to using the heavy tier for everything.
