← 返回
AI智能 中文

Model Router

Route model requests based on configured models, costs and task complexity. Use for routing general/low-complexity requests to the cheapest available model and for higher-complexity requests to stronger models.
根据模型、成本和任务复杂度进行请求路由,通用/低复杂度请求使用最便宜的模型,复杂请求使用更强的模型。
mrjootta
AI智能 clawhub v0.1.1 1 版本 99827.3 Key: 无需
★ 11
Stars
📥 3,827
下载
💾 577
安装
1
版本
#latest

概述

model-router

This skill provides a compact, runnable router that inspects an OpenClaw-style configuration (or a simple models JSON) and selects an appropriate model for an incoming request based on:

  • declared model capabilities and an optional cost score
  • task complexity (heuristic: short/simple vs long/complex)
  • explicit overrides (user or caller hints)

Design principles

  • Keep decision logic small and deterministic.
  • Default to the cheapest model for general, not-complex tasks.
  • Escalate to stronger models when the task appears complex or asks for high-fidelity results.
  • Make model metadata explicit (capabilities, cost_score, tags) so the router is transparent and auditable.

What this skill includes

  • scripts/router.py — a small CLI and library to pick a model given a task description and a models configuration file.
  • examples/models.json — example model configurations (name, provider, cost_score, capabilities).

When to use

  • Trigger when you need to programmatically choose which LLM to call for a user request.
  • Use for batching or middleware routing in server apps.

Usage (quick)

  • Prepare a models file (JSON) with model entries. See examples/models.json.
  • Call: python3 scripts/router.py --models examples/models.json --task "Summarize this email" --mode auto
  • The script prints the chosen model and the reasoning.

Files

  • scripts/router.py — router CLI/library
  • examples/models.json — sample model list

版本历史

共 1 个版本

  • v0.1.1 当前
    2026-03-28 12:10 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

Nano Banana Pro

steipete
使用 Nano Banana Pro (Gemini 3 Pro Image) 生成或编辑图像。支持文生图、图生图及 1K/2K/4K 分辨率,适用于图像创建、修改及编辑请求,使用 --input-image 指定输入图像。
★ 417 📥 115,205
ai-intelligence

Proactive Agent

halthelobster
将AI智能体从任务执行者升级为主动预判需求、持续优化的智能伙伴。集成WAL协议、工作缓冲区、自主定时任务及实战验证模式。Hal Stack核心组件 🦞
★ 836 📥 213,107
ai-intelligence

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。支持创建/查询实体(人员、项目、任务、事件、文档)及关联...
★ 712 📥 243,802