Model Router Hook
v4.0.0智能模型路由系统,根据任务复杂度自动切换 AI 模型(fast/thinking)。 当需要: - 自动选择最优 AI 模型(简单任务用 k2p5,复杂任务用 thinking) - 根据用户意图智能路由(代码/分析/查询等) - 控制 API 成本(预算管理) - 学习用户偏好并自适应调整 使用场景: - 开发...
⭐ 0· 283·2 current·2 all-time
MIT-0
Download zip
LicenseMIT-0 · Free to use, modify, and redistribute. No attribution required.
Security Scan
OpenClaw
Benign
medium confidencePurpose & Capability
The name/description (model routing, cost control, user-preference learning) align with the code and SKILL.md. Declared storage paths, budget logic, intent signals, and OpenClaw integration are coherent with the stated functionality.
Instruction Scope
SKILL.md and code limit actions to routing decisions, local persistence (user/profile/session/cost records), cost estimation, and optionally calling OpenClaw to effect a model switch. The skill persistently stores user profiles and session memory under ~/.openclaw/workspace/memory/model-router/, which is expected for its cross-session learning feature but is a privacy consideration (it will retain user content and derived profiles).
Install Mechanism
No install spec — code files are included and executed by the agent environment. No external downloads or unusual installers are used.
Credentials
The skill does not request credentials or environment variables. It writes/reads local files under the user's home directory (as described in SKILL.md). It sets a local environment flag (_OPENCLAW_MODEL_OVERRIDE) as an integration fallback; this is reasonable for inter-process signaling but should be noted.
Persistence & Privilege
always=false and the skill is user-invocable (normal). The skill creates and updates persistent files (profiles, session memory, cost logs) across sessions. This persistent storage and cross-session learning are consistent with the feature set but increase privacy risk and attack surface (local files containing user data).
Assessment
This skill appears to do what it claims: automatic model routing, cost tracking, and learning user preferences. Before installing, consider: 1) It stores user/session data and cost logs on disk at ~/.openclaw/workspace/memory/model-router/ — if that data would be sensitive in your environment, avoid or restrict it. 2) It may call a local OpenClaw CLI or import openclaw.tools to effect model switches; ensure you trust the local openclaw installation. 3) The code uses subprocess.run (only to call the OpenClaw CLI as provided), so verify there are no additional unexpected subprocess/network calls in the parts of the code not shown. If you need higher assurance, request a full review of the untruncated scripts/model_router.py to confirm there are no hidden network endpoints, telemetry, or arbitrary command execution paths.Like a lobster shell, security has layers — review code before you run it.
ai-routingvk9792ckxa5f153bkzppxdxbhm5827rw8auto-switchvk9792ckxa5f153bkzppxdxbhm5827rw8cost-controlvk9792ckxa5f153bkzppxdxbhm5827rw8latestvk9792ckxa5f153bkzppxdxbhm5827rw8model-routervk9792ckxa5f153bkzppxdxbhm5827rw8
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
