SnowAmberX/dsh-role-router
基于角色的 DeepSeek Harness 模型路由插件:规划器/子代理角色,外加设置卡片和编辑器摘要。
Project Overview项目介绍
This is a native plugin built exclusively for DeepSeek Harness (DSH) that adds role-based model routing functionality. It can be installed via the DSH CLI command dsh plugin --profile web add @snowamberx/dsh-role-router, and after installation you only need to restart dsh web to activate it. It supports three roles: default, planner, and subagent, each of which can be configured with a separate model and reasoning strength. When you enter plan mode with /plan, it automatically routes requests to the configured planner model, and switches back to the default model when you exit plan mode.
This plugin is designed for DSH users who want to use different models for different types of tasks, such as using a more powerful model for planning and a cheaper faster model for daily tasks or subagents. Instead of manually switching models every time you change task types, you just set your preferred models once, and the plugin handles all switching automatically. Any roles you do not configure will have their requests passed through to DSH's default model selector, so your existing workflow remains untouched. The plugin adds a visual configuration card to the DSH settings page, so you can adjust your settings any time you want.
This plugin is released under the permissive BSD-3-Clause open source license, and follows the standard DSH community plugin packaging convention with a valid bundle manifest. There are a few known limitations you should be aware of before using it: only models in the DSH model directory are shown in the dropdown selectors, subagent models are not displayed in the composer summary, and configuration errors will be thrown during loading to help you debug issues. To develop this plugin locally, you clone the repo, run pnpm install and pnpm build, then link it to your local DSH profile.
dsh-role-router 是专为 DeepSeek Harness 开发的原生多角色模型路由插件,支持 default、planner、subagent 三种角色分别配置独立模型,输入 /plan 进入计划模式时自动将请求路由到指定的 planner 模型,退出计划模式后自动切回默认模型,全程无需手动干预。插件提供可视化 Web UI 配置界面,支持两级配置(composition 层与用户层),保存配置后立即生效,无需重启应用。
该插件面向需要按任务角色分配不同模型的 DSH 用户,解决手动切换模型的麻烦。用户只需提前配置好不同角色对应的模型和对应推理强度,之后每次请求都会按当前所处的模式和角色自动完成路由,未配置角色的请求会透传给 DSH 官方模型选择器,完全遵循原有选择逻辑,不影响用户的既有使用习惯。
本插件采用 BSD-3-Clause 开源许可证,可通过 dsh plugin --profile web add @snowamberx/dsh-role-router 命令安装,安装后重启 dsh web 即可生效。插件存在一些已知限制:比如下拉框仅列出模型目录内的模型,子代理模型不会显示在 composer 摘要中等,配置错误会直接在加载期报错,便于用户排查问题。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-role-router(SnowAmberX/dsh-role-router)
仓库:https://github.com/SnowAmberX/dsh-role-router
本站详情页:https://www.yhbd.top/plugins/snowamberx-dsh-role-router/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 BSD-3-Clause · ⭐ 4 · 最近提交 2026-09-19 · 主语言 TypeScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 4 stars - very few users, little community feedback星标只有 4,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add @snowamberx/dsh-role-router
把 SnowAmberX/dsh-role-router 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
中文 | English
多角色模型路由插件(dsh-role-router)
还在为计划与执行阶段手动切换模型而烦恼?dsh-role-router 替你自动完成:输入 /plan 进入计划模式,请求即自动路由到配置的 planner 模型;退出计划模式自动切回默认模型——全程无需手动干预。
- 角色路由:
default/planner/subagent三种角色独立配置——配置了强制使用该模型,未配置则跟随官方模型选择器;planner由计划模式(/plan等)自动触发。 - Web UI:Plugins 页「多角色模型路由」配置页提供三个模型下拉框(并可单独指定推理强度),选项与
/model同源(host 实时模型目录,provider 分组,自动刷新);composer 旁附模型摘要胶囊,当前选择一目了然。 - 两级配置:支持 cordis.yml(composition 层)与
role-routersettings 命名空间(用户层,后者优先);保存即生效,无需重启。
预览


路由语义
每次模型请求按角色路由,监听器注册在根上下文(同时覆盖主代理与所有进程内子代理):
| 角色 | 请求范围 | 模型来源 |
|---|---|---|
default |
默认模式下的主代理请求 | 已配置 → 强制使用配置的模型;未配置 → 请求透传,跟随官方逐层选择 |
planner |
计划模式(plan mode)下的主代理请求 | 已配置 → 强制使用配置的模型;未配置 → 请求透传,跟随官方逐层选择 |
subagent |
所有进程内子代理请求(任意嵌套深度) | 已配置 → 强制使用配置的模型;未配置 → 请求透传,跟随官方逐层选择 |
未配置角色的"跟随官方"是完全透传:插件不改动请求,由 harness 官方的每会话模型选择层按既有优先级决定——本次会话内显式切换(composer / /model)> 会话最近一次请求记录 > 全局默认模型(agent-default-model 设置)。因此会话内切换模型对未配置角色在下一个 turn 生效(官方选择层在请求装配时快照当前选择,turn 进行中的切换不改变进行中的 turn),composer 摘要与实际请求保持一致。
切换模型时,若角色未配置显式 reasoningEffort,则剥离继承的 adapter-owned effort(目标模型可能不支持原模型的推理档位;prepareCall 会拒绝未受支持的显式 effort);配置了显式强度则写入并由 prepareCall 校验。透传的请求保留官方层装配的一切,包括推理强度。
计划模式状态由插件从会话日志的 plan/mode 事件本地折叠;ctx.planMode 可见时优先读取(含 pending 意图)。
辅助模型调用(compaction、session-title)不经 agent/request 派发,不受影响;进程外子代理 provider(acp、codex 等)的请求不经过本进程,同样不受影响。
Web UI(client 半区)
插件声明了 dsh.client(platform: web),向 Web GUI 提供两处界面:
- Plugins → Official →「多角色模型路由」:三个模型下拉框(默认模型 / planner / subagent),选项来自 host 实时模型目录(provider 分组,与
/model同源,llm/adapters-updated自动刷新);每个字段选中模型后还可单独指定推理强度,档位来自该模型在目录中的reasoning.efforts(适配器声明,非硬编码)。- 三个角色字段(默认模型 / planner / subagent)都写入
role-router设置命名空间,保存后下一请求即生效(无需重启);未配置的角色跟随官方模型选择器,配置了则强制使用所选模型。
- 三个角色字段(默认模型 / planner / subagent)都写入
- 会话输入框旁(composer):胶囊摘要显示
默认模型: <配置的 default 或当前会话选择> · planner: <配置的 planner 模型>。官方模型席位(下拉选择)与/model命令保持原样。
配置
cordis.yml(composition 层)
- id: model-router
name: '@snowamberx/dsh-role-router'
config:
default: # 可选;不写键则保持未配置(透传)
provider: deepseek-official
model: deepseek-v4-flash
reasoningEffort: high # 可选;未配置时遵循目标模型默认
planner: # 可选
provider: deepseek-official
model: deepseek-v4-pro
reasoningEffort: max # 可选
subagent: # 可选
provider: deepseek-official
model: deepseek-v4-flash
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
ishuowang/dsh-agent-team-room
loopx-project/loopx
omdsh-dev/DSH-better-sidebar
tingly-dev/tingly-box