{"slug": "a-harness-plugin-that-autoswitches-to-the-appropriate-model-to-save-u-tokens", "title": "A harness plugin that autoswitches to the appropriate model to save u tokens", "summary": "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.", "body_md": "I keep forgetting to switch models. I don't need Opus 5.5 to write docs; Sonnet is good enough.\n\nautoswitch is a Claude Code mod that picks the model for each prompt, so you don't have to `/model` by hand.\n\nRequires Claude Code 2.1.299+ and a claude.ai or Anthropic API login (not Bedrock/Vertex/Foundry).\n\n```\n/plugin install autoswitch --marketplace ilyesarf/autoswitch\n```\n\nOn older versions:\n\n```\n/plugin marketplace add ilyesarf/autoswitch\n/plugin install autoswitch@autoswitch\n```\n\nOr run it from a local clone: `claude --plugin-dir /path/to/autoswitch`\n\nJust prompt as usual. A toast shows when it switches.\n\n- `!<model> prompt` forces a model:`!opus` ,`!sonnet-5` ,`!haiku-5-5`\n- `/autoswitch` shows the model ladder,`/autoswitch refresh` rebuilds it\n- `/config` has`compact_threshold` (default 100k tokens) and`max_model_age_days` (default 180)\n\n1. **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.\n2. **Rate** : a cheap model scores each prompt 1-10, and the score picks a rung on the ladder.\n3. **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.", "url": "https://wpnews.pro/news/a-harness-plugin-that-autoswitches-to-the-appropriate-model-to-save-u-tokens", "canonical_source": "https://github.com/ilyesarf/autoswitch", "published_at": "2026-10-16 14:24:59+00:00", "updated_at": "2026-10-16 14:47:05.958971+00:00", "lang": "en", "topics": ["ai-tools", "large-language-models", "ai-products", "developer-tools"], "entities": ["autoswitch", "Claude Code", "Anthropic", "claude.ai", "Bedrock", "Vertex", "Foundry", "ilyesarf"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/a-harness-plugin-that-autoswitches-to-the-appropriate-model-to-save-u-tokens", "markdown": "https://wpnews.pro/news/a-harness-plugin-that-autoswitches-to-the-appropriate-model-to-save-u-tokens.md", "text": "https://wpnews.pro/news/a-harness-plugin-that-autoswitches-to-the-appropriate-model-to-save-u-tokens.txt", "jsonld": "https://wpnews.pro/news/a-harness-plugin-that-autoswitches-to-the-appropriate-model-to-save-u-tokens.jsonld"}}