PerryLink/dsh-autotier0

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

包名
dsh-autotier
版本
0.2.3
许可证
Apache-2.0
最近更新
2026年9月12日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:PerryLink/dsh-autotier

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.

KeyDefaultMeaning
tiers.strong.providerdeepseek-officialProvider for the planning/review tier.
tiers.strong.modeldeepseek-v4-proCatalog id of the strong model.
tiers.strong.efforthighAdapter vocabulary off | low | high | max.
tiers.strong.followSessionfalsefalse = this tier's effort overrides the session's.
tiers.strong.fallback[]Ordered provider/model landings when the tier is unavailable.
tiers.cheap.providerdeepseek-officialProvider for the implementation tier.
tiers.cheap.modeldeepseek-v4-flashCatalog id of the cheap model.
tiers.cheap.effortlowAdapter vocabulary off | low | high | max.
tiers.cheap.followSessiontruetrue = inherit the session's effort so an explicit choice wins.
tiers.cheap.fallback[]Ordered provider/model landings when the tier is unavailable.
tiers.vision.providerdeepseek-officialProvider for image-carrying turns.
tiers.vision.modeldeepseek-v4-flash-vision-expThe catalog's image-capable model.
intent.ruleThreshold0.7Confidence at or above which the rule layer decides alone.
intent.attemptBand.enabledfalseStart the middle band on the cheap tier and escalate on a signal.
intent.attemptBand.tauLow0.45Lower bound of the attempt-first band.
intent.hysteresis.toStrong0.8Score that switches a cheap turn to strong.
intent.hysteresis.toCheap0.6Score below which a strong turn returns to cheap.
intent.rules[]Declarative rule table (when.patterns / when.tools / when.cwd, tier, priority).
intent.judge.enabledtrueAllow the low-confidence judge.
intent.judge.model''Judge model id; empty = first catalog model containing flash.
intent.judge.temperature0Judge sampling temperature.
intent.judge.maxTokens16Judge output cap (it answers with one word).
intent.judge.cooldownMs30000Minimum gap between two judge calls.
intent.judge.timeoutMs2000Judge call timeout.
intent.judge.unavailableSkip2Consecutive judge failures after which the turn skips it.
intent.scenariosall truePer-scenario switches: coding, review, planning, retrieval, batch, daily, longText, multimodal.
intent.costModebalancedAmbiguity arbitration: cost-first | quality-first | balanced.
guard.enabledtrueEnable 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.interopDefendautoRelationship with dsh-defend: auto audits coexistence, none stays silent.
escalation.threshold2Failures within the window that raise the tier.
escalation.windowMs60000Failure-counting window.
escalation.ttlMs180000How long an escalation stays in effect.
escalation.fallbackTtlMs300000TTL used after a fallback landing was taken.
escalation.signaturetrueCount same-signature recurrences instead of every failure.
routingModeautoauto | 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.