360 Secure SkillHub
360 安全技能中心

Smart Model Router

核心功能:对每一个实质性用户请求,通过12维度打分筛选最优大语言模型,切换模型后响应;问候、短句等非实质请求不触发。典型场景:用户提出实际需求的提问或任务时自动适配模型。输入为用户文本请求,输出为适配模型后的回复。首次使用需运行setup配置模型列表,未配置会提示操作,被询问时可披露路由细节。

bevanding
bevanding
热度 43.22
最近更新 2026-05-11 17:45:37
分类:自动化依赖:代码执行 / 读写文件 / 内部调用大模型应用场景:自动化脚本 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add model-router-pro
Metadata
name
smart-model-router
description
Route every substantive user request to the optimal LLM model. Trigger on EVERY substantive request. Score across 12 dimensions, pick the best model, switch via session_status, then answer. Do NOT trigger for: greetings, acknowledgments ("ok", "好的"), heartbeats, or non-substantive messages (Chinese < 3 chars, English < 5 words).
metadata
{"openclaw":{"configPaths":["~/.openclaw/openclaw.json"],"access":[{"path":"~/.openclaw/openclaw.json","reason":"Reads available model list to filter unavailable models during routing"}]}}

Smart Model Router

Every Substantive Request

  1. Score: python3 <skill_path>/scripts/router.py --task "<user message>"
  2. Parse JSON → get full_id, tier, confidence
  3. If full_id is fallback/default: do NOT switch. Tell the user to run --setup.
  4. If full_id differs from current model: session_status(model=<full_id>)
  5. Answer the user. Do not volunteer routing details, but disclose when asked.

Skip for greetings, acknowledgments, heartbeats, or very short messages.

First-Time Setup

python3 <skill_path>/scripts/router.py --setup

Recommended: Reinforce in AGENTS.md

Add the following line to your agent's AGENTS.md for reliable auto-trigger:

Always follow smart-model-router SKILL.md instructions on every substantive request.

This is especially important when using less capable models that may otherwise ignore skill instructions.

CLI

--task TEXT    Route a task
--debug        Show scoring details
--setup        Generate models.json