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.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/digitaladaption/model-routerModel 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:
- Provider setup - Add your API keys (Anthropic, OpenAI, Gemini, etc.)
- Task mappings - Choose which model for each task type
- 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
| Provider | Models | Best For | Key Format |
|---|---|---|---|
| Anthropic | claude-opus-4-5, claude-sonnet-4-5, claude-haiku-4-5 | Coding, reasoning, creative | sk-ant-... |
| OpenAI | gpt-4o, gpt-4o-mini, o1-mini, o1-preview | Tools, deep reasoning | sk-proj-... |
| Gemini | gemini-2.0-flash, gemini-1.5-pro, gemini-1.5-flash | Multimodal, huge context (2M) | AIza... |
| Moonshot | moonshot-v1-8k/32k/128k | Chinese language | sk-... |
| Z.ai | glm-4.5-air, glm-4.7 | Cheapest, fast | Various |
| GLM | glm-4-flash, glm-4-plus, glm-4-0520 | Chinese, coding | ID.secret |
🎛️ Task Type Mappings
Default routing (customizable via wizard):
| Task Type | Default Model | Why |
|---|---|---|
simple | glm-4.5-air | Fastest, cheapest for quick queries |
coding | claude-sonnet-4-5 | Excellent code understanding |
research | claude-sonnet-4-5 | Balanced depth and speed |
creative | claude-opus-4-5 | Maximum creativity |
math | o1-mini | Specialized reasoning |
vision | gemini-1.5-flash | Fast multimodal |
chinese | glm-4.7 | Optimized for Chinese |
long_context | gemini-1.5-pro | Up to 2M tokens |
💰 Cost Optimization
Metadata
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 skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-digitaladaption-model-router": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
security-skill-scanner
Security scanner for ClawdHub skills - detects suspicious patterns, manages whitelists, and monitors Moltbook for security threats.
cron-creator
Create Clawdbot cron jobs from natural language. Use when: users want to schedule recurring messages, reminders, or check-ins without using terminal commands. Examples: 'Create a daily reminder at 8am', 'Set up a weekly check-in on Mondays', 'Remind me to drink water every 2 hours'.