I keep forgetting to switch models. I don't need Opus 5.5 to write docs; Sonnet is good enough.
autoswitch is a Claude Code mod that picks the model for each prompt, so you don't have to /model by hand.
Requires Claude Code 2.1.299+ and a claude.ai or Anthropic API login (not Bedrock/Vertex/Foundry).
/plugin install autoswitch --marketplace ilyesarf/autoswitch
On older versions:
/plugin marketplace add ilyesarf/autoswitch
/plugin install autoswitch@autoswitch
Or run it from a local clone: claude --plugin-dir /path/to/autoswitch
Just prompt as usual. A toast shows when it switches.
!<model> promptforces a model:!opus,!sonnet-5,!haiku-5-5/autoswitchshows the model ladder,/autoswitch refreshrebuilds it/confighascompact_threshold(default 100k tokens) andmax_model_age_days(default 180)
- Discover : lists your usable models (two newest per family, released in the last 180 days) and ranks them haiku < sonnet < opus < fable, then by version.
- Rate : a cheap model scores each prompt 1-10, and the score picks a rung on the ladder.
- Switch : before a switch, compacts the conversation if it's large. A model that fails is dropped and the turn retries one rung down. Models that need paid credits are skipped while your credits are off.