Intelligent AI model router that automatically switches between two configured models (local for simple tasks, cloud for complex ones). Detects local models (Ollama, LM Studio) automatically, routes based on task complexity and privacy. Use when users ask to "switch model", "use local/cloud model", or mention API keys/passwords (triggers privacy mode). Trigger on: sensitive data detection (forces local), complex tasks like "design architecture" (uses cloud), or configuration requests.
紧凑、智能的模型路由,开箱即用。
bash
您的请求 → 分析 → 选择模型
↓
简单?→ 主模型(快速/低成本)
复杂?→ 备选模型(功能强大)
隐私?→ 主模型(强制)
| 模式 | 分值 |
|---|---|
| 微服务、架构 | +10 |
| 设计、实现、优化 |
阈值:5(简单 vs 复杂)
| 功能 | 状态 |
|---|---|
| 自动检测本地模型 | ✓ (Ollama, LM Studio) |
| 云端模型注册表 |
bash
python
from skill.core.router import RouterCore
router = RouterCore()
result = router.route(设计微服务)
print(result.model_name) # Claude Opus 4
print(result.reason) # complex_task(score=15)
print(result.confidence) # 0.75
创建 ~/.model-router/models.json:
json
{
primary_model: {id: ollama:llama3:8b},
secondary_model: {id: anthropic:claude-opus-4},
models: [...]
}
无配置时:自动检测本地模型并使用云端注册表。
检测到敏感数据时自动强制使用主模型(本地):
本版本融合了:
该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 ai-model-router-1776064922 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 ai-model-router-1776064922 技能
skillhub install ai-model-router-1776064922
文件大小: 8.89 KB | 发布时间: 2026-4-14 16:01