← 返回 Skills 市场
hmchenggh

Auto Model Router

作者 HMCHENGGH · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
114
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install auto-model-router-glm
功能描述
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

Plan C:GLM 懶人模式

定位:一個GLM Coding Plan走天涯,適合不想折騰嘅用家

# 範疇 模型 型號
1 高邏輯推理 GLM-5 primary
2 代碼生成 GLM-5 / GLM-4.7 primary / fallback
3 創意寫作 GLM-5 primary
4 資訊閱讀 GLM-4-Flash primary
5 簡單重複 GLM-4-Flash primary
6 圖片理解 GLM-4.6V primary
7 圖片生成 CogView4 primary
8 影片/音頻 GLM-4-Voice primary

Plan C 特色

  • ✅ 全部使用GLM系列模型
  • ✅ 根據工作複雜度自動選擇合適型號
  • ✅ 支援思考模式切換(GLM-4.7)
  • ✅ 語音對話支援粵語方言

配置流程

首次使用

用戶輸入:「/model-router setup」
系統自動引導:
  1. 選擇套餐 [Plan A / Plan B / 自定義]
  2. 輸入可用模型
  3. 系統智能分配
  4. 保存配置
  5. 自動重載 OpenClaw

智能分配邏輯

當用戶提供的模型少於8個時,系統自動:

  1. 直接匹配:最符合該範疇的模型
  2. 系列擴展:同系列模型跨範疇使用
  3. 能力估算:選擇最接近能力需求的模型

示例:用戶提供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.1 2026-04-07 加入Plan C:GLM懶人模式,更新task-rules.json加入GLM關鍵詞和Vibe Coding支援

貢獻

歡迎提交 Issue 和 Pull Request!

安全使用建议
This skill appears to be a documentation/config helper that tells OpenClaw how to map tasks to models. It does not bundle code or request credentials, so installing it won't itself send secrets anywhere. Two practical things to consider before installing: (1) To actually call the listed models (OpenAI, Anthropic, GLM, etc.) your agent environment must already have the appropriate API keys configured — the skill does not supply or request them. (2) The SKILL.md is a high-level specification (writes config under ~/.openclaw/skills/auto-model-router/ and mentions auto-reload and sub-agent creation) but provides no concrete code; runtime behavior depends on your OpenClaw agent implementing those actions. If you want fully automated routing behavior, confirm your agent/platform implements the config write, reload, and sub-agent creation steps, and review any runtime code that will act on these config files before enabling autonomous invocation.
功能分析
Type: OpenClaw Skill Name: auto-model-router-glm Version: 1.0.0 The skill bundle is a legitimate tool designed to help an AI agent automatically route tasks to the most appropriate LLM models based on task complexity and category. It contains configuration files (config/*.json), classification rules (task-rules.json), and instructions (SKILL.md) for managing model selection across eight different work domains. The logic includes support for international and regional model plans, a sub-agent dispatching mechanism for handling interrupted tasks, and fallback procedures for unknown inputs. No evidence of malicious intent, data exfiltration, or harmful prompt injection was found; the instructions are consistent with the stated purpose of model orchestration.
能力标签
cryptocan-make-purchases
能力评估
Purpose & Capability
Name/description (route tasks to models) matches files and SKILL.md: task categories, model plans, config files and mapping rules are all about model selection and sub-agent dispatch. There are no unrelated env vars, binaries, or config paths requested.
Instruction Scope
SKILL.md contains detailed classification logic, config locations (~/.openclaw/skills/auto-model-router/), and steps to save config and 'auto reload OpenClaw'. It also describes generating sub-agents and querying model capability via 'local database' or 'API identification' but does not include concrete commands or code. The instructions are scoped to routing/config; they do instruct writing/reading skill-specific config in the user's OpenClaw folder (expected) and leave implementation details vague.
Install Mechanism
No install spec and no code files to install — instruction-only skill, so nothing is downloaded or executed by a packaged installer. This is the lowest-risk install pattern.
Credentials
Skill declares no required environment variables or credentials. The SKILL.md references many third-party model identifiers (OpenAI, Anthropic, GLM, etc.); using those providers in practice requires API keys/credentials elsewhere on the agent/platform. The lack of explicit credential requests is coherent for a reusable skill, but users should understand provider/API credentials must be present in their environment for routing to be effective.
Persistence & Privilege
always is false and the skill is user-invocable. The skill expects to persist its own config under ~/.openclaw/skills/auto-model-router/, which is normal for a skill. It does not request system-wide changes or other skills' credentials.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install auto-model-router-glm
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /auto-model-router-glm 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Auto Model Router Skill 1.0.0 - Initial public release. - Automatically selects the best model for each task category based on user input and model availability. - Supports 8 major task categories with intelligent classification and model assignment. - Offers three plans: International (Plan A), Domestic (Plan B), and GLM One-Stop (Plan C). - Features sub-agent dispatching for unexpected/side tasks. - Includes fallback logic for unknown tasks or models and easy configuration via commands.
元数据
Slug auto-model-router-glm
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Auto Model Router 是什么?

Auto Model Router - Automatically select the best model based on task complexity for OpenClaw agents. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 114 次。

如何安装 Auto Model Router?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install auto-model-router-glm」即可一键安装,无需额外配置。

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。

💬 留言讨论