dsh-autotier
Automatic strong/cheap model-tier routing for DeepSeek Harness: intent-gated tier landing on the agent/request waterfall, plan-mode handoff (strong plans, cheap implements), deterministic high-risk guards on tools/pre-execute, failure escalation with TTL fallback, a /tier command, and tier status tools
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:PerryLink/dsh-autotier说明文档
阅读完整 README ↗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.