← 返回 Skills 市场
hermes-model-router
作者
freepengyang
· GitHub ↗
· vv1.0.1
· MIT-0
82
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install hermes-model-router
功能描述
Automatically routes tasks to local or cloud AI models based on complexity, ensuring context continuity and single-entry model selection.
使用说明 (SKILL.md)
Model Router · OpenClaw
本地优先的智能模型选择器 — 根据任务复杂度自动路由到本地或服务商模型
核心原则
- 模型选择只在任务入口做一次
- 同一任务中途不切换模型(保护上下文连续性)
- 简单任务用本地,复杂任务用服务商
功能
任务复杂度判断
-
简单任务 → 本地模型(Ollama / llama.cpp)
- 单次回答即可完成
- 不需要多步推理或迭代
- 类型:翻译、格式转换、查定义、简单写作、文本润色
-
复杂任务 → 服务商模型(MiniMax / OpenRouter / 其他)
- 需要深度推理、多次迭代
- 长上下文理解
- 类型:代码调试、架构设计、战略分析、长文撰写
模型配置
providers:
local:
ollama:
endpoint: "http://localhost:11434"
default_model: "qwen2.5-coder:7b"
llama.cpp:
endpoint: "http://localhost:8080"
default_model: "qwen2.5-coder-7b-q4"
cloud:
minmax:
endpoint: "https://api.minimax.chat"
default_model: "MiniMax-Text-01"
openrouter:
endpoint: "https://openrouter.ai/api/v1"
default_model: "anthropic/claude-sonnet-4-5"
使用方式
交互式分类
python3 scripts/classify_task.py "帮我把这段中文翻译成英文"
输出示例:
复杂度:简单
路由:本地模型(Ollama/qwen2.5-coder:7b)
理由:单次完成,无需迭代
批量分类
python3 scripts/classify_task.py "分析这个产品的市场策略" --verbose
上下文连续性保护
| 情况 | 处理方式 |
|---|---|
| 任务内切换 | ❌ 不允许 |
| 新任务开始 | ✅ 重新判断 |
| 模型不可用 | 自动降级到同级别模型 |
扩展服务商
新增服务商只需在配置中添加:
providers:
cloud:
新服务商:
endpoint: "API地址"
default_model: "默认模型"
决策示例
| 任务描述 | 判断 | 路由 |
|---|---|---|
| "翻译成英文" | 简单 | 本地模型 |
| "写一个快速排序" | 简单 | 本地模型 |
| "调试内存泄漏" | 复杂 | 服务商模型 |
| "分析市场策略" | 复杂 | 服务商模型 |
| "润色邮件" | 简单 | 本地模型 |
| "设计后端架构" | 复杂 | 服务商模型 |
文件结构
openclaw-model-router/
├── SKILL.md # 本文件
├── package.json # OpenClaw 清单
├── install.sh # 安装脚本
└── scripts/
├── classify_task.py # 任务分类器
└── setup_wizard.py # 配置向导
版本:v1.0.1 许可证:MIT 作者:freepengyang
安全使用建议
This skill appears to do what it says: a keyword-based task classifier and a config wizard to point to local/cloud model endpoints. Before installing: (1) inspect the directory you're running install.sh from so you know what will be copied; (2) don't paste API keys or secrets into config.json unless you accept storing them in plain JSON under ~/.model-router (the installer sets the directory to 700, but file permissions follow your umask); (3) verify any external provider endpoints you add are correct and trusted. Minor metadata mismatches exist (package.json/homepage/version differ from registry metadata), which can be benign but you may want to confirm the author/source if provenance matters.
功能分析
Type: OpenClaw Skill
Name: hermes-model-router
Version: v1.0.1
The skill bundle provides a legitimate utility for routing AI tasks between local and cloud-based models based on task complexity. The installation script (install.sh) and configuration wizard (setup_wizard.py) perform standard local file operations and configuration management without any evidence of data exfiltration, unauthorized network access, or malicious persistence. The core logic in classify_task.py is a simple keyword-based classifier that operates entirely locally and safely.
能力评估
Purpose & Capability
Name/description match the provided artifacts: a classifier (scripts/classify_task.py) and a configuration wizard (scripts/setup_wizard.py) that route tasks to local or cloud endpoints. The files required are appropriate for this purpose.
Instruction Scope
SKILL.md instructs running the included Python scripts and editing provider endpoints. The runtime instructions and scripts operate on task text and local configuration files only; they do not read unrelated system files or environment variables, nor do they send data to external endpoints.
Install Mechanism
There is no remote installer; install.sh is included and copies the repo into a skills directory under the user's home (~/.clawdbot/skills or ~/clawd/skills) and creates ~/.model-router. No network downloads or archived extracts are performed. Note: install.sh copies all files from the current directory into the target, so if you run it from an unexpected location it will copy whatever is present.
Credentials
The skill declares no required env vars or credentials, which matches the code. The setup wizard stores endpoints and model names to ~/.model-router/config.json; the code does not prompt for API keys, but a user could place secrets into that config manually. The installer sets the config directory to mode 700, reducing exposure; however the config file's permissions follow the user's umask. Be cautious about storing API keys or tokens in plain config.json.
Persistence & Privilege
The skill does not request always:true and does not modify other skills or global agent configs. Its persistence is limited to copying its own files into user skill dirs and creating ~/.model-router—reasonable for a skill that holds config.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install hermes-model-router - 安装完成后,直接呼叫该 Skill 的名称或使用
/hermes-model-router触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
vv1.0.1
新增开发/全栈任务关键词识别,优化分类准确性
vv1.0.0
Initial release: LLM provider configuration skill for OpenClaw agents. Supports OpenRouter, OpenAI, Azure, Anthropic, Google AI, Ollama, and local models.
元数据
常见问题
hermes-model-router 是什么?
Automatically routes tasks to local or cloud AI models based on complexity, ensuring context continuity and single-entry model selection. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 82 次。
如何安装 hermes-model-router?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install hermes-model-router」即可一键安装,无需额外配置。
hermes-model-router 是免费的吗?
是的,hermes-model-router 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
hermes-model-router 支持哪些平台?
hermes-model-router 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 hermes-model-router?
由 freepengyang(@freepengyang)开发并维护,当前版本 vv1.0.1。
推荐 Skills