BruceLanLan/dsh-tier-router
Two-tier model routing: a strong tier plans, advises and reviews while a cheap tier implements, with plan-mode-aware auto routing, a high-impact escalation guard, failure auto-escalation, and subagent tiering.
dsh-tier-router adds tiered model routing to DeepSeek Harness: a strong tier (deepseek-v4-pro by default) handles planning, architecture, design, and review; a cheap tier (deepseek-v4-flash by default) handles routine implementation; each tier has its own fallback chain and task-intensity reasoning effort. In auto mode the session writes a request/header that selects the tier per step; a plan/mode flip moves between plan (strong) and execution (cheap). Subagents get tiered dispatch through agentOptions injection with an agent/request waterfall that swaps provider/model per tier. An escalation gate denies high-impact actions (rm -rf, credential files) from the cheap tier until the strong tier is selected, and agent/error failures within a window temporarily escalate to the strong tier (TTL). It ships a tiered agent preset (a standard copy plus tier-routing config) so routing is opt-in per session.
Install
dsh plugin --profile web add dsh-tier-routerProfile-store install verbatim per README (main, fetched 2026-09-08; repo last pushed 09-03): "dsh plugin --profile web add dsh-tier-router". The README states installation is verified in practice — the package resolves from the profile store, and the host bundle synchronizes the packaged tiered preset into ~/.dsh/.agent-presets on the next DSH startup (no manual preset copy). Then restart DSH and choose tiered in the preset picker for a new session (or make it the profile default through agent-presets). Local development uses the same path: "dsh plugin --profile web add .". Note: the public npm registry does not carry dsh-tier-router (404 re-verified 2026-09-08) — the profile-store resolution is the documented, author-verified route; no github: source form is documented in the README (removed prior ungrounded github:BruceLanLan form). Uninstall: dsh plugin --profile web remove dsh-tier-router; delete ~/.dsh/.agent-presets/tiered separately when no longer wanted.
Compatibility
DeepSeek Harness web profile. Agent-plane routing: tools, slash commands, prompt sections, and routing listeners mount only when a session uses the tiered preset; the profile bundle's only host responsibility is synchronizing the packaged tiered preset into DSH's discovery root on startup. Two tiers: a strong tier (deepseek-v4-pro by default) handles planning/architecture/review, 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 and opusplan, implemented through official DSH seams with an escalation gate, failure auto-escalation, and subagent tiering. High-impact actions (rm -rf / credential files) are denied by a tools/pre-execute guard until the strong tier is selected.
Details
- Repo: BruceLanLan/dsh-tier-router
- Category: Models & Providers
- Stars: 6
- Version: dsh-tier-router v0.5.0 (package.json main; profile-store install per README; public npm 404 as of 2026-09-08)
- Last push: 2026-08-16
- First seen: 2026-08-15
Recent updates
The current English README documents: the two-tier architecture (strong planning/review vs cheap implementation, per-tier fallback chains), the header-driven routing flow and subagent dispatch waterfall, the escalation gate (cheap tier + high-impact pattern → deny + escalation hint), failure auto-escalation with TTL, the tiered preset synchronization, install/uninstall (including the no-manual-copy preset sync), and the plane note (agent-plane routing mounted per session).
FAQ
- Which model runs each phase?
- A strong tier (deepseek-v4-pro by default) handles planning/architecture/review; a cheap tier (deepseek-v4-flash by default) handles routine implementation, with per-tier fallback chains and task-intensity reasoning effort.
- How do I activate routing?
- Install the plugin and choose the tiered preset in the preset picker for a new session (or make it the profile default). No manual preset copy is required — the host bundle synchronizes it on startup.
- Can the cheap tier run dangerous actions?
- No — a tools/pre-execute guard denies high-impact actions (rm -rf, credential files) from the cheap tier until the strong tier is selected, and failures auto-escalate to the strong tier within a window.
Alternatives
yanglongyun/ramify-dsh · xiaozhe7772222/dsh-api-key-pool · BruceLanLan-dsh-tier-router