Feature: automatic model routing (thinking vs routine)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 19.9k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 30
Description
Problem
Switching models mid-session via ctrl+tab is tedious when you want to use a stronger model (e.g. Opus) for reasoning/planning and a cheaper/faster model (e.g. Sonnet) for routine tasks like file reads, grep, simple edits.
Proposal
Add a [model_routing] config section in config.toml:
[model_routing]
thinking = "claude-opus-4-7"
routine = "claude-sonnet-4-6"
When enabled, jcode would automatically route:
- Thinking model: used for the main conversation turn (reasoning, planning, code generation)
- Routine model: used for tool-only turns where the agent is just reading files, running grep, executing simple commands, etc.
Heuristics for routing
A turn could be classified as "routine" if it consists only of tool calls with no substantial reasoning, e.g.:
- File reads (
cat,Read,Glob) - Search (
Grep,rg) - Simple shell commands (
ls,git status) - Cache clears, test runs
And "thinking" for everything else:
- Planning, architecture discussion
- Code generation / edits
- Debugging with analysis
- Multi-step reasoning
Alternative: explicit control
If automatic classification is too complex, a simpler version could let users tag turns:
- Default to the routine model
- Switch to thinking model when reasoning effort is above a threshold
- Or use the existing effort slider as the routing signal
Motivation
On long sessions, most turns are routine (reading context, verifying state). Using Opus for those is wasteful. But the 2-3 turns that need deep reasoning really benefit from Opus. Currently the user has to manually switch back and forth, which is a friction point.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No implementation files or tests are named. Start by locating config.toml parsing and the turn/model-selection entry points, then review how ctrl+tab and the effort slider choose models. Done should mean the selected model-routing behavior is defined, configurable, and covered for thinking versus routine turns.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- ai, cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100