快速了解
它能做什么
为 DeepSeek Harness 自动将请求路由到强模型、低成本模型或视觉模型层级。
本站提供的是中文说明,不代表该项目或 Plugin 自身提供中文界面;语言支持请以上游文档为准。
Web Profile
DeepSeek Harness 0.1.2-rc.1 or 0.1.5-rc.1; Node ^22.19.0 or >=24.0.0
证据已验证
核对日期 2026/9/10 UTC 14:23
选择前先看
dsh-autotier 是一个 DeepSeek Harness 插件包,会为每一轮请求分类并选择配置好的模型层级。它可让规划或审查使用强模型层级,让简单工作使用低成本层级,并将携带图片的请求路由至视觉层级;同时提供 /tier 会话覆盖、路由状态工具、失败升级和低成本层级下的高风险操作防护。
适合谁
希望减少手动切换模型、但仍需可配置路由策略的 DeepSeek Harness 用户。
常见任务
- 将复杂的规划、调试和审查工作路由到更强的已配置模型层级。
- 让日常问答、检索、批处理和例行工作使用低成本模型层级。
- 通过 /tier、tier_status 或 tier_route 查看或覆盖单个会话的路由。
- 在插件设置中配置层级提供商、模型、回退、意图规则、防护策略和升级时间。
权限与数据
清单声明了出站网络和会话追加权限。
权限- network:outbound
- session:append
- 提供的文档称,路由设置通过共享的 autotier 设置命名空间保存。
- 提供的文档称,插件不读写普通文件,也不读取、记录或存储凭据。
- 已配置的 LLM 提供商;启用时包括低置信度判定模型请求。
- 未声明插件专属凭据要求;已配置的模型提供商可能有自己的要求。
局限
- 提供的证据未证明此快照已实际完成安装或运行。
- 意图规则是有限的;不熟悉的复杂表述可能先使用低成本层级,之后才因失败或防护拒绝而升级。
- 升级状态和学习状态只保存在内存中,重启 Harness 后会重置。
- 该防护被描述为纵深防御而非沙箱,且默认只保护低成本层级。
- 不会自动将 GUI 中选择的模型识别为委托路由;需要时请使用 routingMode: delegated 或 /tier off。
DSHub 已核对
- 固定源码定义了 DSH bundle patch、web 客户端注入,以及 DeepSeek Harness 0.1.2-rc.1 和 0.1.5-rc.1 的兼容性声明。
- 不可变插件包结构和 patch 验证已通过。
- 清单声明 Apache-2.0 许可证、Node ^22.19.0 或 >=24.0.0、出站网络权限和会话追加权限。
DSHub 未核对
- 本次整理未执行安装、重启、模型请求、防护拒绝、失败升级或 UI 行为。
- 提供的证据未审计 npm 注册表包的内容。
固定版本安装
安装 dsh-autotier
这个Plugin Bundle没有 DSH Plugin 安装操作,请根据源码文档使用真实交付方式。
维护者原文
项目 README
dsh-autotier
Automatic model-tier routing for DeepSeek Harness: one user instruction enters, one tier decision comes out — no manual model switching.
Complex intent (architecture, planning, debugging, multi-step engineering) is planned on the strong tier and then implemented on the cheap tier. Simple intent (questions, retrieval, batch chores, daily work) is designed and implemented on the cheap tier directly. While the cheap tier executes, high-risk tool calls are denied by a deterministic guard, and repeated failures escalate to the strong tier with a TTL fallback.
- Official repository: https://github.com/PerryLink/dsh-autotier
- npm:
dsh-autotier(bare, unscoped)
Compatibility
| Harness | Status |
|---|---|
@deepseek-ai/dsh 0.1.2-rc.1 |
compatible; the compat workflow installs this line end-to-end |
@deepseek-ai/dsh 0.1.5-rc.1 |
compatible; verified end-to-end (real profile install, --dump-config row, keyless headless smoke) and in the compat matrix |
@deepseek-ai/cordis ^4.0.2, @deepseek-ai/schemastery ^3.18.2 |
peer baseline |
Peer ranges name both published lines explicitly (`>=0.1.2-rc.1 <0.2.0 ||
=0.1.5-alpha.1 <0.2.0`), because a semver range whose only prerelease comparator sits on an earlier version tuple does not admit a later alpha. They are refreshed per published wave.
The plugin is host-plane only. It needs no agent preset of its own: the host row applies to every session. A one-line prompt section in your preset is optional and only makes the router's decisions visible to the model (see Install & uninstall).
What you get
- Intent gate — every turn is classified from deterministic signals (message text, tool names, image presence, conversation length). The zero-token rule layer decides when it is confident; only a low-confidence turn calls the cheap judge model, and never on a cooldown.
- Tier landing on the official seam — the decision is applied on the
agent/requestwaterfall by returning a replacement provider/model/effort triple. Sampling scalars the session already chose (temperature,maxTokens,stop) are preserved. - Plan-mode handoff — a complex instruction enters plan mode on the strong tier; leaving plan mode drops back to the cheap tier for implementation.
- High-risk guard — while the cheap tier executes, destructive commands
(
rm -rf,sudo,mkfs,git push --force, credential-file writes, …) are denied with a corrective message telling the model to escalate instead. - Failure escalation — repeated failures (optionally same-signature) raise the tier for a TTL; a model/route failure walks the configured fallback chain.
- Manual escape hatches —
/tier auto|strong|cheap|offand thetier_status/tier_routetools. SettingroutingMode: delegated(or/tier off) stops routing for a session that must keep its own model. ctx.autotierservice — a small read surface (status) plus theautotier/routeveto waterfall andautotier/tier-changedevent, so other plugins can observe or override a decision.
Quick start
npm i -g dsh1024
dsh1024 plugin --profile web add dsh-autotier
Then start (or restart) the harness. The row is appended to your profile's
cordis.patch.yml; routing starts on the next turn with no further setup.
Install & uninstall
npm channel
npm i -g dsh1024
dsh1024 plugin --profile web add dsh-autotier
git channel
git clone https://github.com/PerryLink/dsh-autotier.git
cd dsh-autotier && pnpm install && pnpm run build
dsh plugin --profile web add .
Optional preset prompt section. The router works without it. To let the
model know which tier it is running on, add one row to your agent preset
(docs/preset-row.md has the exact block):
- insert:
- id: autotier-prompt
name: '@deepseek-ai/dsh-system-prompt'
# sections: [...] — see docs/preset-row.md
Uninstall
dsh plugin --profile web remove dsh-autotier
The row, its settings namespace, its command, its tools and its listeners are all removed with the plugin; nothing is written outside the settings document.
Configuration
Every key is validated at load time; an invalid value fails loudly instead of
silently disabling routing. cordis.patch.yml in this repository documents the
same keys inline.
| Key | Default | Meaning |
|---|---|---|
tiers.strong.provider |
deepseek-official |
Provider for the planning/review tier. |
tiers.strong.model |
deepseek-v4-pro |
Catalog id of the strong model. |
tiers.strong.effort |
high |
Adapter vocabulary off | low | high | max. |
tiers.strong.followSession |
false |
false = this tier's effort overrides the session's. |
tiers.strong.fallback |
[] |
Ordered provider/model landings when the tier is unavailable. |
tiers.cheap.provider |
deepseek-official |
Provider for the implementation tier. |
tiers.cheap.model |
deepseek-v4-flash |
Catalog id of the cheap model. |
tiers.cheap.effort |
low |
Adapter vocabulary off | low | high | max. |
tiers.cheap.followSession |
true |
true = inherit the session's effort so an explicit choice wins. |
tiers.cheap.fallback |
[] |
Ordered provider/model landings when the tier is unavailable. |
tiers.vision.provider |
deepseek-official |
Provider for image-carrying turns. |
tiers.vision.model |
deepseek-v4-flash-vision-exp |
The catalog's image-capable model. |
intent.ruleThreshold |
0.7 |
Confidence at or above which the rule layer decides alone. |
intent.attemptBand.enabled |
false |
Start the middle band on the cheap tier and escalate on a signal. |
intent.attemptBand.tauLow |
0.45 |
Lower bound of the attempt-first band. |
intent.hysteresis.toStrong |
0.8 |
Score that switches a cheap turn to strong. |
intent.hysteresis.toCheap |
0.6 |
Score below which a strong turn returns to cheap. |
intent.rules |
[] |
Declarative rule table (when.patterns / when.tools / when.cwd, tier, priority). |
intent.judge.enabled |
true |
Allow the low-confidence judge. |
intent.judge.model |
'' |
Judge model id; empty = first catalog model containing flash. |
intent.judge.temperature |
0 |
Judge sampling temperature. |
intent.judge.maxTokens |
16 |
Judge output cap (it answers with one word). |
intent.judge.cooldownMs |
30000 |
Minimum gap between two judge calls. |
intent.judge.timeoutMs |
2000 |
Judge call timeout. |
intent.judge.unavailableSkip |
2 |
Consecutive judge failures after which the turn skips it. |
intent.scenarios |
all true |
Per-scenario switches: coding, review, planning, retrieval, batch, daily, longText, multimodal. |
intent.costMode |
balanced |
Ambiguity arbitration: cost-first | quality-first | balanced. |
guard.enabled |
true |
Enable the deterministic high-risk guard. |
guard.tiers |
[cheap] |
Tiers the guard protects. |
guard.whitelist |
[] |
Commands, tools or path prefixes that never trip the guard. |
guard.protectedPaths |
['.dsh','AGENTS.md','package.json','.github/workflows'] |
Self-modification surfaces that force strong-tier review. |
guard.interopDefend |
auto |
Relationship with dsh-defend: auto audits coexistence, none stays silent. |
escalation.threshold |
2 |
Failures within the window that raise the tier. |
escalation.windowMs |
60000 |
Failure-counting window. |
escalation.ttlMs |
180000 |
How long an escalation stays in effect. |
escalation.fallbackTtlMs |
300000 |
TTL used after a fallback landing was taken. |
escalation.signature |
true |
Count same-signature recurrences instead of every failure. |
routingMode |
auto |
auto | strong | cheap | delegated | off. |
All keys can also be edited live from the autotier settings namespace
($DSH_HOME/settings.yaml); a write that violates a cross-field requirement is
refused at save time and the last good policy stays in effect.
Tools & surfaces
| Surface | Kind | Purpose |
|---|---|---|
/tier |
command | auto | strong | cheap | off | status; session-scoped override. |
tier_status |
tool | Current tier, mode, escalation TTL and guard state. |
tier_route |
tool | Route one intent string without sending a request (dry run). |
ctx.autotier |
service | status() read surface for other plugins. |
autotier/route |
serial event | Third parties may veto a proposed tier. |
autotier/tier-changed |
emit event | Observability when the effective tier changes. |
Permissions & data
- Files — the plugin reads nothing and writes nothing except through the
shared settings service (the
autotiernamespace). - Network — the only outbound traffic is the judge call, which goes through
the normal
ctx.llmpath and the configured provider. - Session log — the plugin appends no custom session events. The routing
trail is the plugin logger plus the live
autotier/tier-changedbus event; the only append it makes is theplan/modefallback when the plan-mode service is absent. Custom event types are fail-closed on0.1.2-alpha.1and later, so no durable plugin-owned record is written. - Secrets — no credential is read, logged or stored by this plugin.
Security boundaries
- The guard is a defence in depth, not a sandbox. It denies the patterns it
knows on the cheap tier and never weakens
dsh-defend, the approval service, or the sandbox policy. Keep those enabled. - The guard protects only the tiers listed in
guard.tiers(cheap by default). A strong-tier turn is not blocked by design: the strong model is the reviewer. - If the guard itself throws, the call is escalated to the strong tier rather than allowed — a broken guard must not become an open door.
/tier offdisables routing entirely; the harness then behaves exactly as it did before the plugin was installed.
Known limitations
- The rule layer is deterministic and therefore finite: a novel phrasing of a complex request may start on the cheap tier and escalate only after a failure or a guard denial. The judge call covers the low-confidence middle.
- Escalation is per-agent and in-memory; a harness restart starts from
auto. - Tier switching resets the provider prompt cache for the changed request, so very chatty sessions may see a small cache-miss cost on the switch turn. The hysteresis thresholds exist to keep that rare.
- The plugin routes conversation requests. Compaction and title generation are
separate host seams; align their own model settings with the cheap tier if you
want the same cost profile (
docs/supporting-lanes.md). followSession: trueon the cheap tier means an explicit session model choice wins; in that case the cheap tier cannot force its own model.- The Settings card and composer tier pill shipped in 0.2.0. The card (routing mode, live tier landings, model catalog) lives in the Plugins settings section and the pill cycles the session mode from the composer.
- A model picked in the GUI is not detected automatically. The router does
not watch the
agent-default-modeldocument, so switching models there does not by itself stop routing — useroutingMode: delegatedor/tier off. - Fingerprint posteriors are in-memory. They reset on restart and re-learn from the judge's cold-start fallback; persisting them through the settings document is planned for v0.2.
- The attempt-first middle band ships disabled.
intent.attemptBand.enabledstaysfalseuntil the calibration corpus and its metric gate land (v0.2).
Development
pnpm install
pnpm run typecheck # against the local harness checkout type faces
pnpm run typecheck:ci # against the published 0.1.5-rc.1 faces (what CI runs)
pnpm test
pnpm run build
pnpm run verify:self-contained
pnpm run verify:artifacts
pnpm pack
pnpm run build emits lib/types (tsc declarations) and lib/index.js
(tsdown bundle). Tests use the published host packages directly — real
Context, real session/tools/commands/settings services — plus one real Loader
composition over a temporary cordis.yml.
Topics
dsh, dsh-plugin, deepseek-harness, deepseek, cordis, router,
model-tier, cost, auto.
Contributors
PerryLink. Issues and pull requests are welcome at https://github.com/PerryLink/dsh-autotier/issues.
License
Apache-2.0. See LICENSE and THIRD_PARTY_NOTICES.md.
有意识地管理
安装与管理
前置条件与目标 Profile
目标: Web Profile
交付方式: Git Bundle — PerryLink/dsh-autotier#d96e6608408bfb6fba39892f461521819a88a775。
验证、更新与移除
显示生命周期命令
dsh plugin --profile web list兼容性与访问范围
Compatible with declared DeepSeek Harness releases 0.1.2-rc.1 and 0.1.5-rc.1: DeepSeek Harness 0.1.2-rc.1 or 0.1.5-rc.1; Node ^22.19.0 or >=24.0.0。
风险事实
证据与编辑审查Manifest、Bundle patch、分发与新鲜度
不可变证据
审查状态与源码活动
安装前请通过固定的 Git 插件包源码检查声明的默认值,并按需要调整提供商和模型设置。
AI 审查于 2026/9/10 UTC 14:24。GitHub 事实核对日期: 2026/9/10 UTC 14:24。
自当前证据基线以来,没有记录到重要源码变化。