smart-model-switcher-v2

Optimized Smart Model Switcher (v2) - Zero-latency, no restart required. Automatically selects and switches to the best available model for each task from your purchased plan. Runtime model selection with <100ms latency. Supports auto-detection of new models, multi-model parallel processing, and intelligent task classification. Always uses the strongest model within your plan.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "smart-model-switcher-v2" with this command: npx skills add davidme6/smart-model-switcher-v2

🧠 Smart Model Switcher V2 (Optimized)

Zero-Latency • No Restart • Runtime Switching

🎯 What's New in V2

FeatureV1V2
Restart Required❌ Yes✅ No
Switch Latency5-10s<100ms
Model Preloading❌ No✅ Yes
Parallel Processing❌ No✅ Yes
Auto Model Discovery❌ No✅ Yes
Fallback LogicBasicAdvanced
PerformanceLowHigh

🚀 New Features

1. Zero-Latency Switching

  • No gateway restart needed
  • Runtime model selection
  • <100ms switching latency
  • User-transparent operation

2. Model Preloading

  • All plan models preloaded at startup
  • Instant switching between models
  • No API connection delays
  • Connection pooling

3. Intelligent Task Classification

  • Multi-keyword detection
  • Context-aware analysis
  • Confidence scoring
  • Fallback to default if uncertain

4. Parallel Model Processing

  • Multiple models ready simultaneously
  • Fast failover if model unavailable
  • Load balancing across models
  • Automatic retry logic

5. Auto Model Discovery

  • Detects new models in your plan
  • Auto-updates model registry
  • No manual configuration needed
  • Real-time plan synchronization

6. Advanced Fallback

  • Multi-tier fallback chain
  • Graceful degradation
  • User notification on fallback
  • Logs all fallback events

📊 Model Selection Matrix (Optimized)

Task TypePrimary ModelFallback 1Fallback 2Latency
写小说/创意写作qwen3.5-plusqwen3.5-397bqwen-plus<50ms
写代码/编程qwen3-coder-plusqwen3-coder-nextqwen3.5-plus<50ms
复杂推理/数学qwen3-maxqwen3.5-plusqwen-plus<50ms
数据分析qwen3.5-plusqwen3-maxqwen-plus<50ms
日常对话qwen3.5-plusqwen-plusqwen-turbo<30ms
长文档处理qwen3.5-plusqwen3.5-397bqwen-plus<50ms
Debug/修复qwen3-coder-plusqwen3.5-plusqwen-plus<50ms
翻译qwen3.5-plusqwen-plusqwen-turbo<30ms

🔧 Architecture

┌─────────────────────────────────────────────────────────┐
│                   User Request                          │
└─────────────────────────────────────────────────────────┘
                          ↓
┌─────────────────────────────────────────────────────────┐
│              Task Analyzer (30ms)                       │
│  • Keyword matching                                     │
│  • Context analysis                                     │
│  • Confidence scoring                                   │
└─────────────────────────────────────────────────────────┘
                          ↓
┌─────────────────────────────────────────────────────────┐
│           Model Registry (Preloaded)                    │
│  • qwen3.5-plus (Ready)                                 │
│  • qwen3-coder-plus (Ready)                             │
│  • qwen3-max (Ready)                                    │
│  • ... (All models preloaded)                           │
└─────────────────────────────────────────────────────────┘
                          ↓
┌─────────────────────────────────────────────────────────┐
│          Model Selector (20ms)                          │
│  • Select best model for task                           │
│  • Check availability                                   │
│  • Apply fallback if needed                             │
└─────────────────────────────────────────────────────────┘
                          ↓
┌─────────────────────────────────────────────────────────┐
│            Model API Call                               │
│  • Direct API call (no config change)                   │
│  • Connection pooling                                   │
│  • Auto retry                                           │
└─────────────────────────────────────────────────────────┘
                          ↓
┌─────────────────────────────────────────────────────────┐
│              Response                                   │
│  • Return result                                        │
│  • Log performance                                      │
│  • Update statistics                                    │
└─────────────────────────────────────────────────────────┘

⚡ Performance Metrics

MetricV1V2Improvement
Switch Time5-10s<100ms50-100x faster
Memory UsageLowMedium+20% (worth it)
CPU UsageLowLowSame
API Calls11-2Same
User ExperiencePoorExcellentSignificant

🎯 Usage Examples

Example 1: Writing Task

User: "帮我写一本科幻小说"
Agent: "🧠 Switched to qwen3.5-plus (best for novel writing, 1M context)"
[Completes task]

Example 2: Coding Task

User: "帮我写个 Python 爬虫"
Agent: "🧠 Switched to qwen3-coder-plus (best for coding)"
[Completes task]

Example 3: Reasoning Task

User: "这道数学题怎么做?"
Agent: "🧠 Switched to qwen3-max (best for reasoning)"
[Completes task]

Example 4: Multi-Step Task

User: "帮我写个贪吃蛇游戏,然后写个游戏说明"
Agent: "🧠 Switched to qwen3-coder-plus (best for coding)"
[Writes code]
Agent: "🧠 Switched to qwen3.5-plus (best for writing)"
[Writes documentation]

⚠️ Limitations

LimitationDescription
Plan-BoundOnly uses models from your purchased plan
No ExternalWon't call models outside your plan
Requires ConfigNeeds correct openclaw.json setup
MemoryUses 20% more memory for preloading

🔍 Technical Details

Task Classification Algorithm

1. Extract keywords from user request
2. Match against task type keywords
3. Calculate confidence score for each type
4. Select type with highest confidence
5. If confidence < threshold, use default
6. Map type to best model
7. Check model availability
8. Apply fallback if needed

Model Registry

{
  "models": {
    "qwen3.5-plus": {
      "status": "ready",
      "tasks": ["writing", "analysis", "translation"],
      "context": 1000000,
      "priority": 1
    },
    "qwen3-coder-plus": {
      "status": "ready",
      "tasks": ["coding", "debug"],
      "context": 100000,
      "priority": 1
    },
    "qwen3-max": {
      "status": "ready",
      "tasks": ["reasoning", "math"],
      "context": 100000,
      "priority": 1
    }
  }
}

Fallback Chain

Primary Model (Unavailable?)
    ↓
Fallback 1 (Unavailable?)
    ↓
Fallback 2 (Unavailable?)
    ↓
Default Model (Always available)

📈 Benefits

BenefitImpact
No RestartSave 5-10s per switch
Zero LatencyInstant model switching
Better UXUsers don't notice switching
Auto-UpdateNew models auto-detected
ReliableAdvanced fallback logic
EfficientConnection pooling

🆚 Comparison

V1 vs V2

FeatureV1V2
Restart RequiredYesNo
Switch Latency5-10s<100ms
Model PreloadingNoYes
Auto DiscoveryNoYes
FallbackBasicAdvanced
PerformanceLowHigh
MemoryLowMedium (+20%)
User ExperiencePoorExcellent

📝 Installation

# Clone repository
git clone https://github.com/davidme6/openclaw.git

# Copy skill to workspace
cp -r openclaw/skills/smart-model-switcher-v2 ~/.openclaw/workspace/skills/

# Restart Gateway (one-time)
openclaw gateway restart

🔧 Configuration

No configuration needed! The skill auto-detects your plan and available models.

🆘 Troubleshooting

Q: Why didn't it switch models? A: Check logs for fallback events. Primary model may be unavailable.

Q: Can I override the selection? A: Yes, manually specify a model and it will use that.

Q: How do I know which model is being used? A: It always tells you at the start of each task.

Q: Memory usage increased? A: Normal. Model preloading uses 20% more memory for instant switching.

📞 Support


Version: 2.0.0 (Optimized) Author: Created for Coding Plan users License: MIT Release Date: 2026-03-10

🌟 What Makes V2 Special

  1. Zero-Latency - No restart, instant switching
  2. Smart Preloading - All models ready at startup
  3. Auto-Discovery - New models detected automatically
  4. Advanced Fallback - Multi-tier fallback chain
  5. Performance - 50-100x faster than V1
  6. User-First - Transparent, no interruption

Upgrade from V1 today and experience zero-latency model switching! 🚀

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Memory Auto Archive

Automatically archives daily chat logs with keyword highlights and optional AI summaries into organized memory files without manual setup.

Registry SourceRecently Updated
690Profile unavailable
General

AI Tech Intelligence Briefing

Automatically curates and summarizes daily top AI and tech news worldwide, delivering concise, time-zone aware briefings for quick updates.

Registry SourceRecently Updated
1032Profile unavailable
General

Smart Model Switcher V3

Universal Smart Model Switcher V3 - Multi-Provider, Multi-Model intelligent switching. Automatically selects the best model from ALL your purchased API plans...

Registry SourceRecently Updated
1121Profile unavailable
General

Mac AI Optimizer

Optimize macOS for AI workloads (OpenClaw, Docker, Ollama). Turn an 8GB Mac into a lean AI server node with near-16GB performance by disabling background ser...

Registry SourceRecently Updated
1710Profile unavailable