cn-llm-router
国产大模型统一路由。把 DeepSeek、通义千问、智谱 GLM、Kimi、腾讯混元、字节豆包、百度文心、讯飞星火、MiniMax、零一万物 Yi、百川、阶跃 Step 等 12 家国产大模型 + Qwen-VL/GLM-4V/豆包视觉 3 家视觉模型收敛成一个命令入口;支持文本 + 图片多模态任务路由;按任务类型(代码/推理/长文/翻译/摘要/抽取/图像识别)结合能力画像自动或手动选择最合适、最省钱的模型;支持流式输出、自动统计跨厂商 token 成本、硬件自适应限流(不拖累电脑)、本地语义缓存省 token、全链路离线 Mock 调试、技能更新提醒。当用户需要「调用国产大模型」「多模型比价/降本」「统一管理多个模型 Key」「本地跑大模型路由」「不想被某一家厂商绑定」「识别图片/音频内容」时使用。 Skill: cn-llm-router Owner: fyniujin Summary: 国产大模型统一路由。把 DeepSeek、通义千问、智谱 GLM、Kimi、腾讯混元、字节豆包、百度文心、讯飞星火、MiniMax、零一万物 Yi、百川、阶跃 Step 等 12 家国产大模型 + Qwen-VL/GLM-4V/豆包视觉 3 家视觉模型收敛成一个命令入口;支持文本 + 图片多模态任务路由;按任务类型(代码/推理/长文/翻译/摘要/抽取/图像识别)结合能力画像自动或手动选择最合适、最省钱的模型;支持流式输出、自动统计跨厂商 token 成本、硬件自适应限流(不拖累电脑)、本地语义缓存省 token、全链路离线 Mock 调试、技能更新提醒。当用户需要「调用国产大模型」「多模型比价/降本」「统一管理多个模型 Key」「本地跑大模型路由」「不想被某一家厂商绑定」「识别图片/音频内容」时使用。 Tags: latest:2.7.0
Rank
62
Safety
84
Downloads
1.6k
Updated
Oct 10, 2026
Version
2.7.0
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 1.6K downloads reported by the source. Last updated 10/10/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · observed Oct 10, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Oct 10, 2026
- Adoption signal
- 1.6K downloadsadoption · observed Oct 10, 2026
- Latest release
- 2.7.0release · observed Oct 9, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: low.
clawhub skill install s177r8w7p1d7cpbys9bn33kwhs89d0xw:cn-llm-router- Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
- Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-fyniujin-cn-llm-router/snapshot"
Documentation
CLAWHUB
154,643 characters of source documentation, loaded on request.
Extracted files
5 files captured from the source.
SKILL.md
--- name: cn-llm-router description: 国产大模型统一路由。把 DeepSeek、通义千问、智谱 GLM、Kimi、腾讯混元、字节豆包、百度文心、讯飞星火、MiniMax、零一万物 Yi、百川、阶跃 Step 等 12 家国产大模型 + Qwen-VL/GLM-4V/豆包视觉 3 家视觉模型收敛成一个命令入口;支持文本 + 图片多模态任务路由;按任务类型(代码/推理/长文/翻译/摘要/抽取/图像识别)结合能力画像自动或手动选择最合适、最省钱的模型;支持流式输出、自动统计跨厂商 token 成本、硬件自适应限流(不拖累电脑)、本地语义缓存省 token、全链路离线 Mock 调试、技能更新提醒。当用户需要「调用国产大模型」「多模型比价/降本」「统一管理多个模型 Key」「本地跑大模型路由」「不想被某一家厂商绑定」「识别图片/音频内容」时使用。 version: 2.7.0 --- # 国产大模型统一路由(cn-llm-router) > 一个**核心零依赖(纯 Python 标准库,仅讯飞星火可选一个 `websocket-client`)、零密钥打包**的命令行工具,把 12 家国产大模型收敛成「一个入口、一套命令」。你只管说「我要干嘛」,它帮你挑模型、算成本、限并发、逐字流式输出;断网或无 Key 时也能演示路由逻辑。 ## 一、30 秒速查 ```bash # 不配任何密钥,先看「路由建议」(演示/规划用,不发起调用) python scripts/router.py route --prompt "用 Python 写个快排" --task code # 配好密钥后,真正调用(默认 auto 策略 = 任务感知选模型) export DEEPSEEK_API_KEY=sk-xxx # 至少一个厂商即可 python scripts/router.py chat --prompt "解释一下快速排序" --model auto # 看这台电脑的硬件画像与建议并发(不拖累电脑的关键) python scripts/router.py hardware ``` **运行效果示例:** ``` $ python scripts/router.py route --prompt "用 Python 写个快排" --task code ╔══════════════════════════════════════════════════╗ ║ 路由建议模式(未配置 API Key) ║ ║ 以下为推荐方案,不发起实际调用。配 Key 后可真跑。 ║ ╚══════════════════════════════════════════════════╝ 任务分类: code | 推理需求: True | 长度: short | 预算敏感: False 推荐策略(auto): deepseek/deepseek-reasoner └─ 理由: 代码生成+强推理, 性价比最优 备选(cheap): deepseek/deepseek-chat ¥0.0001/千tokens 备选(quality): glm/glm-4 ¥0.0010/千tokens 提示: export DEEPSEEK_API_KEY=sk-xxx 即可调用 ``` ``` $ python scripts/router.py hardware ╔═══════════════ 硬件画像 ═══════════════╗ │ CPU 逻辑核心: 8 核 │ │ 物理内存: 15.9 GB │ │ 硬件档位: mid │ │ 建议最大并发: 2 │ │ 建议单批大小: 8 │ ╚═══════════════════════════════════════╝ ``` - 支持厂商(12 家 · 32 款模型):DeepSeek、阿里通义千问、智谱 GLM、Kimi、腾讯混元、字节豆包、百度文心、讯飞星火、MiniMax、零一万物 Yi、百川智能、阶跃星辰 Step。 - 运行要求:Python 3.8+;**11 家厂商(DeepSeek/通义/智谱/Kimi/混元/豆包/文心/MiniMax/Yi/百川/阶跃)与全部离线功能无需安装任何第三方包**;讯飞星火为可选 `websocket-client`(不装也能用其余 11 家,仅星火调用时给出中文安装指引)。 - 密钥来源:只用**环境变量**,绝不明文落盘、绝不打包进 skill。 ## 二、架构 ``` cn-llm-router/ ├── SKILL.md # 本文件(使用说明 + 风险 + 边界 + FAQ + 反模式) ├── version.json # 版本号(更新提醒比对用) ├── config.example.json # 配置模板(无密钥,复制后改) ├── references/ │ ├── models.yaml # 模型注册表(纯数据,可自助增删厂商) │ └── routing-rules.md # 路由策略规则说明 ├── scripts/ │ ├── router.py # 统一 CLI 入口 + 策略引擎(对外只暴露这一个文件) │ ├── classifier.py # 任务分类器(规则 + 关键词,离线) │ ├── config.py # 配置/密钥读取(仅读环境变量) │ ├── cost_tracker.py # 跨厂商成本聚合(SQLite,本地) │ ├── hardware.py # 硬件画像 + 并发/子任务数自适应 │ ├── cache.py # 本地语义缓存(降 token 消耗,含长度惩罚防误命中) │ ├── report.py # 文本/HTML 成本报表 + 预算告警 │ ├── update_check.py # 更新提醒(可离线,失败静默) │ ├── yaml_simple.py # 自研零依赖 YAML 解析(不引入 PyYAML) │ ├── meta.py # 版本常量 │ ├── session_manager.py # 多轮会话管理(SQLite 对话表 + 历史压缩) │ ├── text_splitter.py
_meta.json
{
"ownerId": "kn7chdrwbdhaqkwajcyhtfvjx989ddb1",
"slug": "cn-llm-router",
"version": "2.7.0",
"publishedAt": 1791547923292
}references/mock_data.json
{
"_说明": "Mock 预设响应库 — 仅开发调试用,完全本地,不同步到任何云端。覆盖 12 个常见场景。",
"scenarios": [
{
"id": "code_quick_sort",
"task_type": "code",
"keywords": ["排序", "sort", "快排", "算法", "python", "代码", "code"],
"priority": 10,
"response": {
"content": "以下是 Python 快速排序的实现:\n\n```python\ndef quick_sort(arr):\n if len(arr) <= 1:\n return arr\n pivot = arr[len(arr) // 2]\n left = [x for x in arr if x < pivot]\n middle = [x for x in arr if x == pivot]\n right = [x for x in arr if x > pivot]\n return quick_sort(left) + middle + quick_sort(right)\n```\n\n时间复杂度:平均 O(n log n),最坏 O(n²)。空间复杂度:O(n)。",
"in_tokens": 45,
"out_tokens": 180
}
},
{
"id": "reason_math_proof",
"task_type": "reason",
"keywords": ["证明", "推导", "定理", "数学", "reason", "推理"],
"priority": 10,
"response": {
"content": "勾股定理证明(欧几里得证法):\n\n设直角三角形两直角边为 a、b,斜边为 c。\n构造边长为 (a+b) 的正方形,内部含四个全等直角三角形和一个小正方形。\n\n大正方形面积 = (a+b)² = 4×(½ab) + c²\n展开:a² + 2ab + b² = 2ab + c²\n化简:a² + b² = c²\n\n证毕。",
"in_tokens": 30,
"out_tokens": 150
}
},
{
"id": "translate_zh_en",
"task_type": "translate",
"keywords": ["翻译", "translate", "英文", "english", "中英文"],
"priority": 10,
"response": {
"content": "Translation: Artificial intelligence is rapidly transforming every aspect of our lives, from healthcare and education to transportation and entertainment. While the technology brings unprecedented convenience and efficiency, it also raises important questions about privacy, employment, and ethics that society must address proactively.",
"in_tokens": 25,
"out_tokens": 55
}
},
{
"id": "summarize_long",
"task_type": "summarize",
"keywords": ["总结", "概括", "摘要", "summarize", "归纳"],
"priority": 10,
"response": {
"content": "文档核心要点:\n\n1. 背景:大模型技术正从「对话」向「执行」演进,Agent 成为新范式\n2. 关键变更:引入函数调用、长期记忆、多步骤规划三大能力\n3. 数据:基准测试准确率从 72% 提升至 89%,推理成本下降 40%\n4. 风险:幻觉率仍达 12%,需要人工审核兜底\n5. 建议:优先在低风险场景试点,逐步向核心业务扩展",
"in_tokens": 200,
"out_tokens": 120
}
},
{
"id": "extract_info",
"task_type": "extract",
"keywords": ["提取", "抽取", "实体", "extract", "信息"],
"priority": 10,
"response": {
"content": "{\n \"entities\": [\n {\"type\": \"公司\", \"value\": \"腾讯科技\"},\n {\"type\": \"时间\", \"value\": \"2026年7月\"},\n {\"type\": \"金额\", \"value\": \"5.2亿元\"},\n {\"type\": \"事件\", \"value\": \"战略融资\"}\n ],\n \"confidence\": 0.94\n}",
"in_tokens": 80,
"out_tokens": 95
}
},
{
"id": "chat_greeting",
"task_type": "chat",
"keywords": ["你好", "hello", "hi", "嗨", "在吗", "介绍"],
"priority": 5,
"response": {
"content": "你好!我是 AI 助手,可以帮你解答问题、写代码、翻译文档、分析数据等。请告诉我你需要什么帮助?",
"in_tokens": 10,
"out_tokens": 45
}
},
{
"id": "code_debug",
"task_type": "creferences/models.yaml
# 模型注册表(国产大模型统一路由)
# 说明:
# - 价格为示例(元 / 每 1M tokens),请以各厂商官方最新定价为准。
# - 新增厂商:只需在此加一段 provider + 一个 adapter(见 scripts/adapters),不动路由逻辑。
# - 字段含义:
# display 中文名
# adapter 适配器类型:openai_compat / ernie / spark
# base_url API 基址(openai_compat / ernie 用)
# base_url_openai 文心 Qianfan OpenAI 兼容端点(可选)
# env_hint 所需环境变量名(仅提示,密钥不进包)
# default_model 默认模型
# models[] name / ctx(上下文窗口 token) / price_in / price_out / reasoner(可选)
# 能力画像(0-10,越大越强,纯本地静态经验值,供 auto 策略打分):
# reason_score 推理能力 code_score 代码能力 long_score 长文能力
# - v2.6 新增:embed_models[] 和 reranks 配置块(embedding 与 rerank 统一接口)
# - v2.7.0 新增:priced_at(采集日期 YYYY-MM-DD)+ price_source(来源说明)
# - 本文件纯数据,不含任何密钥。
providers:
deepseek:
display: DeepSeek
adapter: openai_compat
base_url: https://api.deepseek.com
env_hint: DEEPSEEK_API_KEY
default_model: deepseek-chat
priced_at: 2026-10-09
price_source: manual
models:
-
name: deepseek-chat
ctx: 64000
price_in: 1
price_out: 2
reason_score: 8
code_score: 9
long_score: 6
-
name: deepseek-reasoner
ctx: 64000
price_in: 4
price_out: 16
reasoner: true
reason_score: 10
code_score: 9
long_score: 6
qwen:
display: 阿里通义千问
adapter: openai_compat
base_url: https://dashscope.aliyuncs.com/compatible-mode/v1
env_hint: DASHSCOPE_API_KEY
default_model: qwen-plus
priced_at: 2026-10-09
price_source: manual
models:
-
name: qwen-turbo
ctx: 32000
price_in: 0.8
price_out: 2
reason_score: 6
code_score: 7
long_score: 6
-
name: qwen-plus
ctx: 128000
price_in: 0.8
price_out: 2
reason_score: 7
code_score: 8
long_score: 8
-
name: qwen-max
ctx: 32000
price_in: 2.4
price_out: 9.6
reason_score: 9
code_score: 8
long_score: 6
-
name: qwen-long
ctx: 1000000
price_in: 0.5
price_out: 2
reason_score: 6
code_score: 6
long_score: 10
glm:
display: 智谱 GLM
adapter: openai_compat
base_url: https://open.bigmodel.cn/api/paas/v4
env_hint: ZHIPU_API_KEY
default_model: glm-4-flash
priced_at: 2026-10-09
price_source: manual
models:
-
name: glm-4-flash
ctx: 128000
price_in: 0.1
price_out: 0.1
reason_score: 6
code_score: 6
long_score: 8
-
name: glm-4-air
ctx: 128000
price_in: 1
references/price_history.yaml
{
"snapshots": {}
}AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/fyniujin/skills/cn-llm-router",
"sourceUrl": "https://clawhub.ai/fyniujin/skills/cn-llm-router",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-10T05:58:32.888Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-fyniujin-cn-llm-router/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-fyniujin-cn-llm-router/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-10T05:58:32.888Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "1.6K downloads",
"href": "https://clawhub.ai/fyniujin/cn-llm-router",
"sourceUrl": "https://clawhub.ai/fyniujin/cn-llm-router",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-10T05:58:32.888Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "2.7.0",
"href": "https://clawhub.ai/fyniujin/cn-llm-router",
"sourceUrl": "https://clawhub.ai/fyniujin/cn-llm-router",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-10-09T12:12:03.292Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-fyniujin-cn-llm-router/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-fyniujin-cn-llm-router/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 2.7.0",
"description": "Version 2.7.0 – 价格档案与调价检测能力上线 - 新增本地模型价格档案(price-history),一键查看12家主流大模型基础价与采集日期 - 新增降价检测(price-check),可比对主流厂商价目页哈希变化,提示疑似调价 - 报表(report)新增双轨价格统计:档案价估算 vs API 实测回填 - 代码结构优化,新增 price_registry.py、price_checker.py,移除 skill-card.md - 测试与说明文档同步更新",
"href": "https://clawhub.ai/fyniujin/cn-llm-router",
"sourceUrl": "https://clawhub.ai/fyniujin/cn-llm-router",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-10-09T12:12:03.292Z",
"isPublic": true
}
]
}Record generated Oct 10, 2026.
