Logo van Model Routing

Model Routing

Community
frankxai
model-routing

Intelligent model selection — routes tasks to Haiku (fast/cheap), Sonnet (balanced), or Opus (complex/strategic) by analyzing task complexity. Use when deciding which model to run, optimizing cost vs quality, or building a tiered routing layer.

Overzicht

Uitgeverfrankxai
Repositoryclaude-skills-library
Skillnaammodel-routing
Sterren
47
Forks
6
Meegeleverde bestanden
1
LicentieMIT
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Meegeleverde bestanden: 1

    Scripts, sjablonen en referentiemateriaal die het model tijdens het werken kan lezen. De bestanden kunnen alleen worden gelezen en worden nooit uitgevoerd.

  • Open source

    Gepubliceerd door frankxai op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Model Routing in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/frankxai/claude-skills-library/tree/main/free-skills/model-routing
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/frankxai/claude-skills-library.git /tmp/claude-skills-library
mkdir -p .claude/skills
cp -r /tmp/claude-skills-library/free-skills/model-routing .claude/skills/model-routing
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Model Routing in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Model Routing automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Model Routing niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

Model Routing System

You have access to intelligent model routing. Before executing any task, analyze complexity and route to the appropriate model tier.

Current model IDs and pricing — Last verified: 2026-08-28. Re-verify at platform.claude.com before trusting these again; they have moved more than once in 2026. Haiku → claude-haiku-4-5 ($1.00 / $5.00 per 1M input/output) · Sonnet → claude-sonnet-5 ($2.00 / $10.00) · Opus → claude-opus-5 ($5.00 / $25.00, default). For the hardest long-horizon reasoning, escalate above Opus to claude-fable-5 ($10.00 / $50.00 — most capable; thinking is always on, no disabling it; reserve for genuinely demanding work). Model IDs are complete as written — never append a date suffix. The tiers below are model-agnostic.

Routing Decision Matrix

TASK COMPLEXITY ANALYSIS
────────────────────────────────────────────────────────────────

HAIKU (Fast, Cheap) - claude-haiku-4-5 - Use for:
├── Simple file operations (read, list, navigate)
├── Scaffolding and boilerplate generation
├── Deterministic transformations (format, lint, compile)
├── Status checks and health monitoring
├── SEO metadata generation
├── Deployment commands (after code is written)
├── Documentation formatting
├── Simple search and replace
│
│   Token cost: $1.00/1M input, $5.00/1M output
│   Latency: Fastest
│   Use when: Task has clear, unambiguous steps

SONNET (Balanced) - claude-sonnet-5 - Use for:
├── Feature implementation (standard complexity)
├── Bug fixes requiring analysis
├── Content writing (articles, social posts)
├── Code review and quality checks
├── Test generation
├── Refactoring with clear patterns
├── API integration work
├── Database schema design
│
│   Token cost: $2.00/1M input, $10.00/1M output
│   Latency: Medium
│   Use when: Task requires reasoning but not deep strategy

OPUS (Strategic, Complex) - claude-opus-5 - Use for:
├── Architecture decisions (system design)
├── Multi-agent coordination (council, swarm)
├── Strategic planning (business, product)
├── Complex debugging (multi-file, subtle bugs)
├── Security audits and vulnerability analysis
├── Enterprise AI system design
├── Book writing (narrative, character development)
├── Research synthesis (multiple sources)
├── Ambiguous requirements interpretation
│
│   Token cost: $5.00/1M input, $25.00/1M output
│   Latency: Slower; most capable of the routine tiers
│   Use when: Task requires deep reasoning, creativity, or strategy

FABLE (Hardest, escalation only) - claude-fable-5 - Use for:
├── Long-horizon agentic work where Opus already fell short
├── The single hardest step in an otherwise-Opus-routed task
│
│   Token cost: $10.00/1M input, $50.00/1M output
│   Latency: Slowest; thinking is always on (cannot be disabled)
│   Use when: Opus-tier reasoning wasn't enough — this is a ceiling, not a starting point

Automatic Routing Rules

When processing a request, apply these rules:

Route to HAIKU when:

  • User says: "deploy", "format", "lint", "check status", "list", "scaffold"
  • File patterns: *.config.*, package.json, tsconfig.json
  • Commands: /mcp-status, /inventory-status, /nextjs-deploy (execution phase)

Route to SONNET when:

  • User says: "write", "implement", "fix", "create", "build", "test"
  • File patterns: *.ts, *.tsx, *.py, *.md (content files)
  • Commands: /article-creator, /create-music, /spec, /generate-social

Route to OPUS when:

  • User says: "design", "architect", "strategy", "council", "analyze", "research"
  • Keywords: "enterprise", "system", "multi-agent", "complex", "strategic"
  • Commands: /starlight-architect, /council, /author-team, /research

Escalate to FABLE when:

  • Opus already ran on the task and the result fell short
  • The task is genuinely the hardest tier — long-horizon agentic work, not routine strategy
  • Never route here first; Fable is a ceiling for escalation, not a default

Cost Optimization

BEFORE (No routing):
  All tasks → Opus → $25.00/1M output tokens

AFTER (With routing):
  Simple tasks (40%) → Haiku  → $5.00/1M   = $2.00
  Medium tasks (45%) → Sonnet → $10.00/1M  = $4.50
  Complex tasks (15%) → Opus  → $25.00/1M  = $3.75
  ──────────────────────────────────────────────
  TOTAL: $10.25 vs $25.00 = 59% cost reduction

Implementation in Task Tool

When using the Task tool, specify model based on routing:

javascript
// Simple task - use haiku
Task({
  subagent_type: "Explore",
  model: "haiku",
  prompt: "List all files in src/"
})

// Medium task - use sonnet (default)
Task({
  subagent_type: "code-reviewer",
  model: "sonnet",
  prompt: "Review this PR for issues"
})

// Complex task - use opus
Task({
  subagent_type: "Plan",
  model: "opus",
  prompt: "Design the architecture for a multi-tenant SaaS platform"
})

Command-Level Routing

CommandDefault ModelRationale
/acossonnetRouter needs reasoning
/article-creatorsonnetContent creation
/create-musicsonnetCreative work
/infogeniussonnetResearch + creation
/starlight-architectopusStrategic design
/councilopusMulti-perspective
/researchsonnetInformation synthesis
/specsonnetFeature planning
/nextjs-deployhaikuExecution
/mcp-statushaikuStatus check
/inventory-statushaikuStatus check
/publishhaikuExecution
/polish-contentsonnetEditing
/review-contentsonnetQuality check

Escalation Pattern

If a haiku-routed task fails or produces poor results:

  1. Automatically escalate to sonnet
  2. If still failing, escalate to opus
  3. If opus itself falls short on a genuinely hard task, escalate to Fable — last resort, not a retry habit
  4. Log escalation for learning
haiku (attempt) → fail → sonnet (retry) → fail → opus (retry) → fail (rare) → fable (last resort)

Relationship to other routing configs

This skill is the estate's model-facts reference — current model IDs, context windows, and per-token pricing. It is not the only routing config in the estate, and on task-class routing decisions it does not have the final word:

  • starlight-evals/routing-table.json is the evidence-derived source of truth for task-class routing — which tier a task class should hit, backed by eval-round evidence and confidence scores rather than the judgment calls in this file. Where its route for a task class disagrees with the "Route to X when" rules above, the table wins.
  • agentic-ops-hub/fleet/model-routing.json and a referenced ~/.starlight/routing.toml are operational routing configs elsewhere in the estate. They route by abstract tier name (opus, sonnet, ...) and should resolve those names against this skill (or the evals table) rather than hardcoding their own model IDs or pricing.
  • This skill's job stays narrow: keep the model IDs, context windows, and pricing above correct and current. It is not merged with the other three configs here — this section exists only so the next agent knows which source to trust when they disagree.

Model Routing v1.1 - Implementing claude-flow's intelligent routing pattern. Last verified: 2026-08-28.

Meegeleverde bestanden

Zolang de skill geladen is, leest het model deze bestanden als dat nodig is. Het model kan ze alleen lezen; ze worden nooit uitgevoerd.

Veelgestelde vragen

Wat doet de AI-skill Model Routing?

Intelligent model selection — routes tasks to Haiku (fast/cheap), Sonnet (balanced), or Opus (complex/strategic) by analyzing task complexity. Use when deciding which model to run, optimizing cost vs quality, or building a tiered routing layer.

Waarom Model Routing gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Model Routing bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Model Routing in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/frankxai/claude-skills-library/tree/main/free-skills/model-routing. TypingMind leest het bestand SKILL.md, bundelt de bijbehorende bestanden en installeert het geheel als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Model Routing gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Model Routing gebruiken?

Zoveel als je wilt. Je kunt Model Routing gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Model Routing gratis?

Ja. Deze skill is door frankxai op GitHub gepubliceerd onder de licentie MIT. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇