BruceLanLan/dsh-tier-router
Project Overview项目介绍
dsh-tier-router is a native model routing plugin built exclusively for DeepSeek Harness. It implements a tiered routing strategy that assigns different models based on task complexity, letting the more powerful deepseek-v4-pro handle high-difficulty work like planning, architecture design, and code review while using the lower-cost deepseek-v4-flash for routine day-to-day implementation. It also supports per-tier fallback chains, automatic escalation on repeated step failures within a configured time window, and tiering for subagents, and integrates via DSH’s official extension APIs to provide slash commands, built-in tools, and a web-based settings UI.
The plugin supports multiple routing modes, with the default auto mode following the opusplan style that runs steps on the strong tier during planning and automatically switches to the cheap tier during execution. Users can manually override the tier for the current active session at any time, or call on the strong tier on demand to get targeted decision advice or a full structured code review. A built-in security guard blocks high-impact actions like deleting multiple sensitive files when run on the cheap tier, prompting users to switch to the strong tier before retrying the action. This tool is ideal for DSH users who want to control overall LLM API costs without sacrificing output quality for complex tasks.
dsh-tier-router is released under the permissive MIT license, so it is free to use and modify for any purpose without any paid costs. All custom user configuration is stored persistently in DSH’s tier-router settings namespace, so it survives full application restarts. Known limitations include that tier switches only take effect starting from the next step after the switch, and the subagent policy is process-wide with built-in subagents inheriting the parent’s current route. If the /tier command does not appear after installation, users must add the plugin row to their current active agent preset, then restart dsh web to properly activate it.
dsh-tier-router是专为DeepSeek Harness开发的原生分层模型路由插件,实现了根据任务强度分配不同模型的路由策略。它默认让能力更强的deepseek-v4-pro处理规划、架构设计和代码评审这类高复杂度任务,让成本更低的deepseek-v4-flash处理日常编码实现工作,还支持层级失败回退链、任务失败自动升级和子代理分层。插件通过DSH官方接口集成,提供了斜杠命令、内置工具和Web设置界面多种管理方式。
它支持多种工作模式,默认自动模式遵循opusplan风格,规划阶段运行在强模型层级,执行阶段自动切换到便宜层级。用户也可以手动切换当前会话的层级,或是随时调用强模型给出决策建议或进行代码评审。遇到高影响操作(比如批量删除文件),防护机制会阻止廉价层级执行,提示用户切换到强层级后重试。这个插件适合需要控制大模型调用成本,同时希望复杂任务能得到高质量输出的DSH用户使用。
插件以MIT许可证开源,无付费门槛,配置会持久保存在DSH的tier-router设置命名空间中,重启后不会丢失。已知限制包括层级切换会在下一个步骤生效,子策略是进程全局的,内置子代理会继承父进程的路由配置。首次安装后如果看不到/tier命令,需要检查当前会话使用的代理预设是否已经添加了这个插件行,添加后重启dsh web即可正常使用。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-tier-router(BruceLanLan/dsh-tier-router)
仓库:https://github.com/BruceLanLan/dsh-tier-router
本站详情页:https://www.yhbd.top/plugins/brucelanlan-dsh-tier-router/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 5 · 最近提交 2026-09-03 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【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 5 stars - very few users, little community feedback星标只有 5,几乎没人在用,遇到问题缺少社区反馈
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 dsh-tier-router
把 BruceLanLan/dsh-tier-router 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-tier-router — Tiered model routing for DeepSeek Harness
handles planning / architecture / review**, while a cheap tier (deepseek-v4-flash by
default) handles day-to-day implementation, with per-tier fallback chains and
task-intensity reasoning effort. Inspired by Claude Code's /advisor
(consult a stronger model for hard decisions) and opusplan (strong model in plan mode,
cheap model for execution), implemented on DeepSeek Harness through its official seams,
with an escalation gate, failure auto-escalation, and subagent tiering on top.
English · 中文
How it works
flowchart LR
subgraph main["Main session (header-driven)"]
U["User message"] --> IN["agent/inbox/inserted"]
IN -->|"auto mode"| HW["write session request/header"]
PM["plan/mode flip"] --> HW
HW --> API["api-proxy selection layer"]
API --> STEP["each step's model = header tier"]
end
subgraph child["Subagents (agent/request swap)"]
W["tier_worker dispatch"] -->|"agentOptions injection"| C["subagent"]
C --> AR["agent/request waterfall"]
AR -->|"swap provider/model per tier"| STEP2["subagent steps"]
end
G["tools/pre-execute guard"] -.->|"cheap tier + high-impact pattern"| DENY["deny + escalation hint"]
E["agent/error failures"] -.->|"within window"| ESC["temporary strong tier (TTL)"]
sequenceDiagram
participant U as User
participant S as Session (main agent)
participant A as Strong v4-pro
participant C as Cheap v4-flash
U->>S: /tier plan (enter plan mode)
S->>S: write header -> strong
S->>A: planning / architecture / design
U->>S: approve plan, leave plan mode
S->>S: write header -> cheap
S->>C: routine implementation
S->>A: tier_advisor (hard decisions) / tier_review (final review)
Note over S,C: high-impact actions (rm -rf / credential files) are denied by the guard until the strong tier is selected
Features
- Automatic tiered routing (auto mode, opusplan-style): steps run on the strong tier
while plan mode is active and on the cheap tier during execution. Before a loop
builds its first or resumed request, the router synchronizes the agent's model
options and durable
request/header; later route changes preserve unrelated request settings such asmaxTokens. - Per-session scoping:
/tier strong|cheap|auto|delegated|offaffects only the current session; other sessions in the process keep their own tier (global defaultauto). Indelegatedmode the main session stays on its model-picker selection while only subagents use tier routing;/tier autoremains an explicit per-session override. Sessions that should not be managed can opt out with a single/tier off. - On-demand advice (advisor-style): the
/advisor <question>command and thetier_advisortool hand one decision question plus gathered evidence to the strong tier and return advice / evidence / risks / acceptance criteria; implementation stays on the current tier. - Review phase: the
tier_reviewtool and/tier review <focus>ask the strong tier to review a change set and return anAPPROVE / NEEDS-CHANGES / BLOCKEDverdict with issues ranked by severity. - Failure auto-escalation: repeated step errors within a window (default 2 errors /
60s) temporarily escalate the session to the strong tier (default 180s), expiring via
TTL; sessions in
offmode never escalate. - Configurable tiers (durable):
/tier set <strong|cheap> <provider> <model> [effort]or thetier_configuretool can point either tier at any registered provider/model, configure the strong tier to follow the session selection, and set ordered fallback chains. Configuration persists in thetier-routersettings namespace and survives restarts (passsessionOnly: truefor a transient change). - WebUI settings: the Tier routing settings page configures providers, models, reasoning effort, follow-session behavior, fallback chains, routing mode, and the subagent policy. It uses the live model catalog when available and preserves custom routes when it is not.
- Per-tier fallback chains: if the primary
model is unavailable (unknown model, quota, rate limit, missing/invalid credential,
server/transport error, or any status >= 500 failure), the router changes route at the
supported request-error boundary and retries the same step on the next entry. Remove
every entry to disable fallback. Fallback state is per agent and tier, returns to the
primary after the fallback TTL (default 5 min,
state.fallbackTtlMs), and never crosses from a cheap chain to a strong chain during a plan transition. - Task-intensity reasoning effort: the strong tier follows your session model
selection by default (
/tier set strong follow-session); the cheap tier starts atmediumand raises itself tohigh/max(bounded by the model's declared efforts, e.g. deepseek models declare off/high/max) on cheap-tier retry errors, high-impact guard denials, or thetier_escalate_efforttool;/tier effort <medium|high|max>sets it manually.tier_configureand/tier setvalidate every effort againstllm.resolveModelInfowhen metadata is available.
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
Q00/ouroboros
crafter-station/petdex
whiteguo233/OpenBiliClaw
anywhere-labs/Agents-Anywhere
agentrq/agentrq
freestylefly/wesight