← 返回 Skills 市场
107
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install auto-model-router-hmchenggh
功能描述
Auto Model Router - Automatically select the best model based on task complexity for OpenClaw agents
使用说明 (SKILL.md)
Auto Model Router Skill
智能模型路由:根據工作類型自動選擇最適合的模型
概述
Auto Model Router 係一個 OpenClaw Skill,自動根據用戶輸入的工作類型,選擇最適合的模型處理。
核心功能
- 任務分類引擎:自動識別8大工作範疇
- 模型智能分配:用戶只需提供1-N個模型,系統自動補全剩餘範疇
- Multi-Agent 分派:突發任務自動分派子 Agent 處理
- 雙套餐支援:Plan A(國際模型)/ Plan B(國內模型)
八大工作範疇
| # | 範疇 | 輸入特徵 | 輸出特徵 | 關鍵詞 |
|---|---|---|---|---|
| 1 | 高邏輯推理 | 分析需求、策略問題 | 計劃、報告、評估 | 分析、評估、比較、推理、策略、規劃 |
| 2 | 代碼生成 | 技術需求、功能描述 | 可執行代碼 | 函數、代碼、編程、debug、重構 |
| 3 | 創意寫作 | 創作需求 | 故事、文案、劇本 | 寫、創作、故事、編劇、文案 |
| 4 | 資訊閱讀 | 文檔、文章、連結 | 摘要、翻譯、問答 | 總結、摘要、翻譯、閱讀、解釋 |
| 5 | 簡單重複 | 格式化需求 | 轉換結果 | 格式化、批量、轉換、整理 |
| 6 | 圖片理解 | 圖片 + 文字 | 圖片分析 | 截圖、圖片、分析、識別、OCR |
| 7 | 圖片生成 | 文字描述 | 圖片 | 生成圖片、海報、設計 |
| 8 | 影片/音頻 | 影片/音頻 + 文字 | 分析或生成 | 影片、音頻、剪輯、字幕 |
模型套餐
Plan A:國際模型
| # | 範疇 | 模型 A | 模型 B |
|---|---|---|---|
| 1 | 高邏輯推理 | Claude Opus 4 | DeepSeek R1 |
| 2 | 代碼生成 | GPT-4.5 | Claude Sonnet 4 |
| 3 | 創意寫作 | GPT-4o | MiniMax 2.7 |
| 4 | 資訊閱讀 | Claude Haiku | Gemini Flash |
| 5 | 簡單重複 | Gemini Flash-Lite | GPT-4o-mini |
| 6 | 圖片理解 | Claude Sonnet 4 | Gemini 2.0 |
| 7 | 圖片生成 | DALL-E 3 | Stable Diffusion |
| 8 | 影片/音頻 | GPT-4o | Gemini 2.0 |
Plan B:國內模型
| # | 範疇 | 模型 A | 模型 B |
|---|---|---|---|
| 1 | 高邏輯推理 | DeepSeek R1 | GLM-5 |
| 2 | 代碼生成 | GLM-5 | Kimi K2 |
| 3 | 創意寫作 | MiniMax M2.5 | 文心一言 5.0 |
| 4 | 資訊閱讀 | MiniMax-01 | GLM-4-Long |
| 5 | 簡單重複 | GLM-4-Flash | DeepSeek V3 |
| 6 | 圖片理解 | MiniMax-VL-01 | GLM-4.6V |
| 7 | 圖片生成 | 騰訊混元-Image | 豆包Seed |
| 8 | 影片/音頻 | Vidu Q3 | 可靈 2.6 |
配置流程
首次使用
用戶輸入:「/model-router setup」
系統自動引導:
1. 選擇套餐 [Plan A / Plan B / 自定義]
2. 輸入可用模型
3. 系統智能分配
4. 保存配置
5. 自動重載 OpenClaw
智能分配邏輯
當用戶提供的模型少於8個時,系統自動:
- 直接匹配:最符合該範疇的模型
- 系列擴展:同系列模型跨範疇使用
- 能力估算:選擇最接近能力需求的模型
示例:用戶提供5個模型
用戶輸入:Claude Opus, GPT-4.5, GPT-4o, Claude Haiku, Gemini Flash-Lite
系統自動分配:
高邏輯推理 → Claude Opus ✅
代碼生成 → GPT-4.5 ✅
創意寫作 → GPT-4o ✅
資訊閱讀 → Claude Haiku ✅
簡單重複 → Gemini Flash-Lite ✅
圖片理解 → Claude Opus (擴展)
圖片生成 → GPT-4o (擴展)
影片/音頻 → GPT-4o (擴展)
任務分類引擎
分類演算法
輸入:用戶工作描述
↓
┌─────────────────────────────────┐
│ 第一層:意圖檢測 │
│ • 動詞分析 │
│ • 名詞分析 │
│ • 輸出期望 │
└─────────────────────────────────┘
↓
┌─────────────────────────────────┐
│ 第二層:關鍵詞匹配 │
│ • 匹配8大範疇關鍵詞 │
│ • 計算相似度 │
└─────────────────────────────────┘
↓
┌─────────────────────────────────┐
│ 第三層:分類結果 │
│ • 主分類 │
│ • 次分類(混合任務) │
│ • 置信度 │
└─────────────────────────────────┘
混合任務處理
當工作涉及多個範疇時:
任務:「分析數據後寫報告」
↓
主分類:高邏輯推理(分析)
次分類:創意寫作(報告)
↓
執行:高邏輯模型 → 創意寫作模型
突發任務處理
機制:Sub-Agent 分派
主任務執行中(高邏輯推理)
↓
突發任務:「幫我翻譯這份文件」
↓
系統自動:
1. 保存主任務狀態
2. 生成翻譯子 Agent
3. 使用資訊閱讀模型翻譯
4. 完成後返回結果
5. 恢復主任務
配置
{
"subagents": {
"translator": {
"model": "minimax-01",
"task_type": "info_reading"
},
"image_generator": {
"model": "hunyuan-image",
"task_type": "image_generation"
},
"video_agent": {
"model": "vidu-q3",
"task_type": "video_audio"
}
}
}
未知範疇 Fallback
當遇到未定義的工作類型時
未知工作:「語音識別」
↓
┌─────────────────────────────────┐
│ 能力評估 │
│ 語音 → 文字 → 處理 │
│ 最接近:資訊閱讀 │
└─────────────────────────────────┘
↓
映射到:資訊閱讀範疇
↓
使用該範疇配置的模型
預設映射表
| 未知範疇 | 映射到 | 理由 |
|---|---|---|
| 語音識別 | 資訊閱讀 | 音頻→文字→處理 |
| 語音合成 | 創意寫作 | 文字→語音創作 |
| 3D建模 | 圖片生成 | 空間理解類似 |
| 數據分析 | 高邏輯推理 | 需要分析推理 |
| 搜索研究 | 資訊閱讀 | 信息檢索整理 |
完全無法識別時
使用:高邏輯推理模型(預設fallback)
提示:「已為此任務分配高邏輯推理模型」
可選:用戶確認或修改
未知模型處理
當用戶輸入不在預設列表的模型
用戶輸入:「我用 XYZ 模型」
↓
┌─────────────────────────────────┐
│ 查詢模型能力 │
│ • 本地數據庫 │
│ • API 識別 │
└─────────────────────────────────┘
↓
┌─────────────────────────────────┐
│ Fallback 規則 │
│ • 通用/無描述 → 高邏輯推理 │
│ • 強調創意 → 創意寫作 │
│ • 強調速度/平 → 簡單重複 │
│ • 強調翻譯/長文本 → 資訊閱讀 │
│ • 強調編程 → 代碼生成 │
└─────────────────────────────────┘
配置檔案
位置
~/.openclaw/skills/auto-model-router/
├── SKILL.md # 本文件
├── config/
│ ├── default.json # 預設配置
│ ├── plan-a.json # Plan A 配置
│ ├── plan-b.json # Plan B 配置
│ └── user.json # 用戶自定義
└── task-rules.json # 分類規則
配置格式
{
"version": "1.0",
"plan": "A",
"task_models": {
"high_logic": "anthropic/claude-opus-4",
"code_generation": "openai/gpt-4.5",
"creative_writing": "openai/gpt-4o",
"info_reading": "anthropic/claude-haiku",
"simple_repeat": "google/gemini-flash-lite",
"image_understanding": "anthropic/claude-sonnet-4",
"image_generation": "stability/stable-diffusion",
"video_audio": "openai/gpt-4o"
},
"subagents": {
"enabled": true,
"pool": ["translator", "image_generator", "video_agent"]
},
"fallback": {
"unknown_task": "high_logic",
"unknown_model": "high_logic"
}
}
命令
| 命令 | 描述 |
|---|---|
/model-router setup |
開始配置嚮導 |
/model-router plan [A/B/custom] |
選擇套餐 |
/model-router list |
列出當前配置 |
/model-router update \x3C範疇> \x3C模型> |
更新特定範疇 |
/model-router reset |
重置為預設 |
使用範例
示例 1:完整配置
用戶:/model-router setup
系統:選擇套餐 [1] Plan A (國際) [2] Plan B (國內) [3] 自定義
用戶:1
系統:請輸入你可用的模型(用逗號分隔)
用戶:Claude Opus, GPT-4.5, GPT-4o
系統:智能分配完成:
高邏輯推理 → Claude Opus
代碼生成 → GPT-4.5
創意寫作 → GPT-4o
資訊閱讀 → Claude Opus (擴展)
簡單重複 → GPT-4.5 (擴展)
圖片理解 → Claude Opus (擴展)
圖片生成 → GPT-4o (擴展)
影片/音頻 → GPT-4o (擴展)
系統:配置已保存。是否重載 OpenClaw?[Y/N]
示例 2:突發任務
主任務:策劃年度報告
使用的模型:DeepSeek R1(高邏輯)
突發:翻譯英文文件
系統:自動切換到 MiniMax-01(資訊閱讀)
翻譯完成,自動切換回 DeepSeek R1
繼續策劃報告
常見問題
Q1:轉模型時需要問用戶嗎?
不需要。系統自動切換,通過 OpenClaw per-job model override 實現。
Q2:如果提供的模型數量為0?
使用預設套餐:直接套用 Plan A 或 Plan B。
Q3:如何處理完全未知的任務?
使用高邏輯推理模型作為 fallback,並提示用戶確認。
Q4:支援多少個模型?
理論上無限。系統自動根據能力分配到8個範疇。
更新日誌
| 版本 | 日期 | 更新內容 |
|---|---|---|
| 1.0 | 2026-04-05 | 初始版本 |
貢獻
歡迎提交 Issue 和 Pull Request!
安全使用建议
This skill appears coherent and implements a model-routing/configuration helper. Before installing: (1) confirm you are comfortable the skill will write config files to ~/.openclaw/skills/auto-model-router/ and may trigger an OpenClaw reload; (2) understand that actual model API keys (OpenAI, Anthropic, etc.) are not provided by this skill and must be managed separately by your platform — ensure those credentials are stored securely elsewhere; (3) if you want to restrict the skill's ability to modify agent state, review OpenClaw's permission controls for skill file writes and reload actions. If any of the model names or default mappings are not appropriate for your environment, review and edit the included config/*.json and task-rules.json before enabling.
功能分析
Type: OpenClaw Skill
Name: auto-model-router-hmchenggh
Version: 1.0.0
The skill bundle is a model routing utility designed to automatically select the most appropriate AI model based on task complexity (e.g., logic, coding, creative writing). The logic is implemented via instructions in SKILL.md and configuration files like task-rules.json and plan-a.json, which define task categories and model mappings. There is no evidence of malicious code, data exfiltration, or harmful prompt injections; the 'auto-reload' and 'sub-agent' features are consistent with the stated goal of managing agent workflows and configurations.
能力标签
能力评估
Purpose & Capability
Name, description, and included config files (plan-a/plan-b/default, task-rules) all align with a model-routing/configuration helper. There are no unexpected required binaries or environment variables that don't belong to a router skill.
Instruction Scope
SKILL.md describes classification rules, mapping logic, configuration commands, and a setup flow. It asks the agent to save configuration under ~/.openclaw/skills/auto-model-router/ and to 'auto reload OpenClaw' after setup — this is within scope for a skill that manages agent model assignments, but it does involve writing to the agent's skill directory and reloading the agent. There are no instructions to read unrelated system files, secrets, or to send data to third‑party endpoints.
Install Mechanism
No install spec or code files that would be downloaded/executed at install time; the skill is instruction-only. Lowest-risk install footprint.
Credentials
The skill declares no required environment variables or credentials. It references external model identifiers (openai/anthropic/etc.) but does not request API keys itself — management of those credentials appears to be left to the platform/user, which is proportionate for a routing helper.
Persistence & Privilege
always is false and disable-model-invocation is default (agent may invoke autonomously). The skill expects to write its own config files under ~/.openclaw/skills/auto-model-router/ (normal for a skill). It does not request system-wide privileges or claim to modify other skills' configs.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install auto-model-router-hmchenggh - 安装完成后,直接呼叫该 Skill 的名称或使用
/auto-model-router-hmchenggh触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release - Automatically select the best model based on task complexity
元数据
常见问题
Auto Model Router 是什么?
Auto Model Router - Automatically select the best model based on task complexity for OpenClaw agents. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 107 次。
如何安装 Auto Model Router?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install auto-model-router-hmchenggh」即可一键安装,无需额外配置。
Auto Model Router 是免费的吗?
是的,Auto Model Router 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Auto Model Router 支持哪些平台?
Auto Model Router 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Auto Model Router?
由 HMCHENGGH(@hmchenggh)开发并维护,当前版本 v1.0.0。
推荐 Skills