cd /news/ai-tools/a-harness-plugin-that-autoswitches-t… · home › topics › ai-tools › article
[ARTICLE · art-151400] src=github.com ↗ pub= topic=ai-tools verified=true sentiment=↑ positive

A harness plugin that autoswitches to the appropriate model to save u tokens

A Claude Code plugin called autoswitch automatically selects the model for each prompt, requiring Claude Code 2.1.299+ and a claude.ai or Anthropic API login (not Bedrock, Vertex or Foundry). The plugin discovers usable models — the two newest per family released in the last 180 days — ranks them haiku < sonnet < opus < fable, scores each prompt 1-10 with a cheap model, and switches rungs on that ladder, compacting the conversation when it exceeds a default compact_threshold of 100k tokens and dropping failed models to retry one rung down. It is installed via `/plugin install autoswitch --marketplace ilyesarf/autoswitch`, supports forced models with `!<model> prompt` (e.g. `!opus`, `!sonnet-5`, `!haiku-5-5`), and exposes a max_model_age_days setting defaulting to 180.

read1 min views1 publishedOct 16, 2026
A harness plugin that autoswitches to the appropriate model to save u tokens
Image: Michielbdejong (auto-discovered)

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> prompt forces a model:!opus ,!sonnet-5 ,!haiku-5-5
  • /autoswitch shows the model ladder,/autoswitch refresh rebuilds it
  • /config hascompact_threshold (default 100k tokens) andmax_model_age_days (default 180)
  1. 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.
  2. Rate : a cheap model scores each prompt 1-10, and the score picks a rung on the ladder.
  3. 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.
── more in #ai-tools 4 stories · sorted by recency
── more on @autoswitch 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/a-harness-plugin-tha…] indexed:0 read:1min 2026-10-16 · —