model-switcher is an open-source experiment for Claude Code that helps guide model usage based on the complexity of each prompt.
Before a prompt is processed, it is scored locally using an offline heuristic. Simple prompts continue on the configured session model, while more complex tasks are delegated to a heavier subagent. The scoring happens entirely on your machine, with no additional API calls or external services involved.
The project also includes a statusline that estimates the cost of each turn and the overall session by reading the local Claude Code transcript and applying your own pricing table. This gives developers immediate visibility into usage while they work.
model-switcher is designed for developers who use Claude Code regularly and want a practical way to experiment with task-guided routing and local cost tracking. It is MIT licensed, fully open source, and intended to be customised for individual workflows.
Features include:
• Offline prompt complexity scoring
• Task-guided routing using Claude Code hooks and subagents
• Local turn and session cost tracking
• Configurable routing threshold and pricing
• Merge-based installation with clean uninstall