← 返回
AI智能 中文

chitin-core

Selects the most cost-effective capable model for tasks, handles rate limit failures gracefully, and supports tier overrides and health checks.
为任务选择最具成本效益的可用模型,优雅处理速率限制失败,并支持层级覆盖和健康检查。
adroidian
AI智能 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 750
下载
💾 14
安装
1
版本
#latest

概述

chitin-core

Route tasks to the cheapest capable model. Never crash on rate limits.

Activation

When spawning sub-agents or delegating tasks, use ModelRouter to select the optimal model.

Trigger phrases: "route this", "spawn a sub-agent", "delegate", or any time you need to choose a model for a task.

Usage

Route a Task

node ~/.openclaw/workspace/skills/chitin-core/scripts/router.js route "task description here"

Returns JSON:

{"tier":"MEDIUM","model":"google-antigravity/gemini-3.1-pro","confidence":0.85,"estimatedCost":0.005,"signals":["codeSignals:2×1.2=2.4"]}

Use the returned model value in sessions_spawn.

Handle Failures

If a spawned session fails with a rate limit or error:

node ~/.openclaw/workspace/skills/chitin-core/scripts/router.js fail "provider/model" "error message"

Then re-route — the failed model will be skipped:

node ~/.openclaw/workspace/skills/chitin-core/scripts/router.js route "same task"

Check Health

node ~/.openclaw/workspace/skills/chitin-core/scripts/router.js health

View Costs

node ~/.openclaw/workspace/skills/chitin-core/scripts/router.js costs

Validate Config

node ~/.openclaw/workspace/skills/chitin-core/scripts/router.js validate

Workflow

  1. Receive task from user
  2. Run router.js route "" to get optimal model
  3. sessions_spawn with returned model
  4. If spawn fails → router.js fail "" "" → retry route
  5. Return result to user

Tiers

TierUse CaseModels
------------------------
LIGHTGreetings, simple Q&A, status checksFlash, DeepSeek, gpt-5-mini, Groq, Ollama
MEDIUMCode, summaries, standard tasksGemini Pro, gpt-5.2, DeepSeek Reasoner
HEAVYArchitecture, complex reasoning, agenticgpt-5.2-pro, o3, Codex

Override Tags

Include in task text to force a tier:

  • @light — force cheapest model
  • @medium — force mid-tier
  • @heavy — force most capable

Graceful Degradation

If all models in a tier are rate-limited, the router automatically:

  1. Tries adjacent tiers (escalate or downgrade)
  2. Falls back to local Ollama if configured
  3. Returns structured error with retry time (never crashes)

Configuration

Edit config.json in the skill directory to:

  • Add/remove models per tier
  • Adjust cost figures
  • Tune classification boundaries

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 05:01 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,358 📥 318,365
content-creation

chitin-chronicle

adroidian
通过防止重复、追踪时间线、管理声明以及使用 git 记录不可变的发布历史,协调多代理内容发布。
★ 0 📥 761
ai-intelligence

Proactive Agent

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