ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

model-router

A comprehensive AI model routing system that automatically selects the optimal model for any task. Set up multiple AI providers (Anthropic, OpenAI, Gemini, Moonshot, Z.ai, GLM) with secure API key storage, then route tasks to the best model based on task type, complexity, and cost optimization. Includes interactive setup wizard, task classification, and cost-effective delegation patterns. Use when you need "use X model for this", "switch model", "optimal model", "which model should I use", or to balance quality vs cost across multiple AI providers.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/digitaladaption/model-router
Or

Model Router

Intelligent AI model routing across multiple providers for optimal cost-performance balance.

Automatically select the best model for any task based on complexity, type, and your preferences. Support for 6 major AI providers with secure API key management and interactive configuration.

🎯 What It Does

  • Analyzes tasks and classifies them by type (coding, research, creative, simple, etc.)
  • Routes to optimal models from your configured providers
  • Optimizes costs by using cheaper models for simple tasks
  • Secures API keys with file permissions (600) and isolated storage
  • Provides recommendations with confidence scoring and reasoning

🚀 Quick Start

Step 1: Run the Setup Wizard

cd skills/model-router
python3 scripts/setup-wizard.py

The wizard will guide you through:

  1. Provider setup - Add your API keys (Anthropic, OpenAI, Gemini, etc.)
  2. Task mappings - Choose which model for each task type
  3. Preferences - Set cost optimization level

Step 2: Use the Classifier

# Get model recommendation for a task
python3 scripts/classify_task.py "Build a React authentication system"

# Output:
# Recommended Model: claude-sonnet
# Confidence: 85%
# Cost Level: medium
# Reasoning: Matched 2 keywords: build, system

Step 3: Route Tasks with Sessions

# Spawn with recommended model
sessions_spawn --task "Debug this memory leak" --model claude-sonnet

# Use aliases for quick access
sessions_spawn --task "What's the weather?" --model haiku

📊 Supported Providers

ProviderModelsBest ForKey Format
Anthropicclaude-opus-4-5, claude-sonnet-4-5, claude-haiku-4-5Coding, reasoning, creativesk-ant-...
OpenAIgpt-4o, gpt-4o-mini, o1-mini, o1-previewTools, deep reasoningsk-proj-...
Geminigemini-2.0-flash, gemini-1.5-pro, gemini-1.5-flashMultimodal, huge context (2M)AIza...
Moonshotmoonshot-v1-8k/32k/128kChinese languagesk-...
Z.aiglm-4.5-air, glm-4.7Cheapest, fastVarious
GLMglm-4-flash, glm-4-plus, glm-4-0520Chinese, codingID.secret

🎛️ Task Type Mappings

Default routing (customizable via wizard):

Task TypeDefault ModelWhy
simpleglm-4.5-airFastest, cheapest for quick queries
codingclaude-sonnet-4-5Excellent code understanding
researchclaude-sonnet-4-5Balanced depth and speed
creativeclaude-opus-4-5Maximum creativity
matho1-miniSpecialized reasoning
visiongemini-1.5-flashFast multimodal
chineseglm-4.7Optimized for Chinese
long_contextgemini-1.5-proUp to 2M tokens

💰 Cost Optimization

Metadata

Stars2387
Views0
Updated2026-03-09
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-digitaladaption-model-router": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.