# Send Model Router to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "model-router",
    "name": "Model Router",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/digitaladaption/model-router",
    "canonicalUrl": "https://clawhub.ai/digitaladaption/model-router",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/model-router",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=model-router",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "references/USAGE_EXAMPLES.md",
      "references/model-specs.md",
      "scripts/classify_task.py",
      "scripts/setup-wizard.py"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "model-router",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-05T17:33:40.978Z",
      "expiresAt": "2026-05-12T17:33:40.978Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=model-router",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=model-router",
        "contentDisposition": "attachment; filename=\"model-router-1.1.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "model-router"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/model-router"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/model-router",
    "downloadUrl": "https://openagent3.xyz/downloads/model-router",
    "agentUrl": "https://openagent3.xyz/skills/model-router/agent",
    "manifestUrl": "https://openagent3.xyz/skills/model-router/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/model-router/agent.md"
  }
}
```
## Documentation

### 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

### 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

ProviderModelsBest ForKey FormatAnthropicclaude-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, fastVariousGLMglm-4-flash, glm-4-plus, glm-4-0520Chinese, codingID.secret

### 🎛️ Task Type Mappings

Default routing (customizable via wizard):

Task TypeDefault ModelWhysimpleglm-4.5-airFastest, cheapest for quick queriescodingclaude-sonnet-4-5Excellent code understandingresearchclaude-sonnet-4-5Balanced depth and speedcreativeclaude-opus-4-5Maximum creativitymatho1-miniSpecialized reasoningvisiongemini-1.5-flashFast multimodalchineseglm-4.7Optimized for Chineselong_contextgemini-1.5-proUp to 2M tokens

### Aggressive Mode

Always uses the cheapest capable model:

Simple → glm-4.5-air (~10% cost)
Coding → claude-haiku-4-5 (~25% cost)
Research → claude-sonnet-4-5 (~50% cost)

Savings: 50-90% compared to always using premium models

### Balanced Mode (Default)

Considers cost vs quality:

Simple tasks → Cheap models
Critical tasks → Premium models
Automatic escalation if cheap model fails

### Quality Mode

Always uses the best model regardless of cost

### API Key Storage

~/.model-router/
├── config.json       # Model mappings (chmod 600)
└── .api-keys         # API keys (chmod 600)

Features:

File permissions restricted to owner (600)
Isolated from version control
Encrypted at rest (via OS filesystem encryption)
Never logged or printed

### Best Practices

Never commit .api-keys to version control
Use environment variables for production deployments
Rotate keys regularly via the wizard
Audit access with ls -la ~/.model-router/

### Example 1: Cost-Optimized Workflow

# Classify task first
python3 scripts/classify_task.py "Extract prices from this CSV"

# Result: simple task → use glm-4.5-air
sessions_spawn --task "Extract prices" --model glm-4.5-air

# Then analyze with better model if needed
sessions_spawn --task "Analyze price trends" --model claude-sonnet

### Example 2: Progressive Escalation

# Try cheap model first (60s timeout)
sessions_spawn --task "Fix this bug" --model glm-4.5-air --runTimeoutSeconds 60

# If fails, escalate to premium
sessions_spawn --task "Fix complex architecture bug" --model claude-opus

### Example 3: Parallel Processing

# Batch simple tasks in parallel with cheap model
sessions_spawn --task "Summarize doc A" --model glm-4.5-air &
sessions_spawn --task "Summarize doc B" --model glm-4.5-air &
sessions_spawn --task "Summarize doc C" --model glm-4.5-air &
wait

### Example 4: Multimodal with Gemini

# Vision task with 2M token context
sessions_spawn --task "Analyze these 100 images" --model gemini-1.5-pro

### ~/.model-router/config.json

{
  "version": "1.1.0",
  "providers": {
    "anthropic": {
      "configured": true,
      "models": ["claude-opus-4-5", "claude-sonnet-4-5", "claude-haiku-4-5"]
    },
    "openai": {
      "configured": true,
      "models": ["gpt-4o", "gpt-4o-mini", "o1-mini", "o1-preview"]
    }
  },
  "task_mappings": {
    "simple": "glm-4.5-air",
    "coding": "claude-sonnet-4-5",
    "research": "claude-sonnet-4-5",
    "creative": "claude-opus-4-5"
  },
  "preferences": {
    "cost_optimization": "balanced",
    "default_provider": "anthropic"
  }
}

### ~/.model-router/.api-keys

# Generated by setup wizard - DO NOT edit manually
ANTHROPIC_API_KEY=sk-ant-...
OPENAI_API_KEY=sk-proj-...
GEMINI_API_KEY=AIza...

### New Features

✅ Interactive setup wizard for guided configuration
✅ Secure API key storage with file permissions
✅ Task-to-model mapping customization
✅ Multi-provider support (6 providers)
✅ Cost optimization levels (aggressive/balanced/quality)

### Improvements

✅ Better task classification with confidence scores
✅ Provider-specific model recommendations
✅ Enhanced security with isolated storage
✅ Comprehensive documentation

### Migration from 1.0

Run the setup wizard to reconfigure:

python3 scripts/setup-wizard.py

### Setup Wizard

python3 scripts/setup-wizard.py

Interactive configuration of providers, mappings, and preferences.

### Task Classifier

python3 scripts/classify_task.py "your task description"
python3 scripts/classify_task.py "your task" --format json

Get model recommendation with reasoning.

### List Models

python3 scripts/setup-wizard.py --list

Show all available models and their status.

### 🤝 Integration with Other Skills

SkillIntegrationmodel-usageTrack cost per provider to optimize routingsessions_spawnPrimary tool for model delegationsession_statusCheck current model and usage

### ⚡ Performance Tips

Start simple - Try cheap models first
Batch tasks - Combine multiple simple tasks
Use cleanup - Delete sessions after one-off tasks
Set timeouts - Prevent runaway sub-agents
Monitor usage - Track costs per provider

### "No suitable model found"

Run setup wizard to configure providers
Check API keys are valid
Verify permissions on .api-keys file

### "Module not found"

pip3 install -r requirements.txt  # if needed

### Wrong model selected

Customize task mappings via wizard
Use explicit model in sessions_spawn --model
Adjust cost optimization preference

### 📖 Additional Resources

Provider Docs:

Anthropic
OpenAI
Gemini
Moonshot
Z.ai
GLM



Setup: Run python3 scripts/setup-wizard.py


Support: Check references/ folder for detailed guides
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: digitaladaption
- Version: 1.1.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-05T17:33:40.978Z
- Expires at: 2026-05-12T17:33:40.978Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/model-router)
- [Send to Agent page](https://openagent3.xyz/skills/model-router/agent)
- [JSON manifest](https://openagent3.xyz/skills/model-router/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/model-router/agent.md)
- [Download page](https://openagent3.xyz/downloads/model-router)