hermes-model-router

vv1.0.1

Automatically routes tasks to local or cloud AI models based on complexity, ensuring context continuity and single-entry model selection.

0· 0·0 current·0 all-time
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
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.
Assessment
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.

Like a lobster shell, security has layers — review code before you run it.

latestvk979bkr2a1j9s3zba5a01kj1cx85dpf5
0downloads
0stars
2versions
Updated 3h ago
vv1.0.1
MIT-0

Model Router · OpenClaw

本地优先的智能模型选择器 — 根据任务复杂度自动路由到本地或服务商模型

核心原则

  1. 模型选择只在任务入口做一次
  2. 同一任务中途不切换模型(保护上下文连续性)
  3. 简单任务用本地,复杂任务用服务商

功能

任务复杂度判断

  • 简单任务 → 本地模型(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

Comments

Loading comments...