Back to home@yhfgyyf

dsh-auto-preset-router

Routes the first DSH prompt to Standard, PTC, Minimal, or Cordis with DeepSeek V4 Flash.

Stars
0
Language
JavaScript
Created
Aug 20, 2026
Updated
Aug 20, 2026
GitHub repo

Introduction

DSH Auto Preset Router

简体中文

A DeepSeek Harness profile bundle that adds an Auto Agent Preset. The first direct user prompt is classified by the fixed deepseek-official/deepseek-v4-flash model, then the untouched prompt runs under one of DSH's four shipped presets with the model selected for that session.

Routing policy

TargetSelected for
standardWeb/current information, mixed work, general assistance, full tool ecosystem, or ambiguity
codeBroad batch or parallel tool orchestration where PTC fan-out/fan-in is central
minimalFocused, self-contained implementation, debugging, refactoring, or algorithm work needing only persistent bash and the editor
cordisDSH preset, Cordis composition/plugin, host-plane, or runtime wiring work

The classifier uses no tools, reasoning effort off, temperature 0, and a 16-token output limit. A failed or ambiguous classification falls back to standard.

Install

DeepSeek Harness 0.1.0-rc.6 or a compatible later build is required.

dsh plugin --profile web add github:yhfgyyf/dsh-auto-preset-router
dsh web

For a separately installed TUI profile that composes the official agent-presets service, install the bundle into that profile too:

dsh plugin --profile tui add github:yhfgyyf/dsh-auto-preset-router
dsh --profile tui

The bundle keeps the official roster service, contributes its package-owned read-only preset through that roster, and sets the assembly default to auto. It does not rewrite settings.yaml. An explicit user setting remains authoritative; set this if needed:

agent-presets:
  default: auto

After the first prompt is routed, DSH records agent-preset/selected before the first real turn. The session is then locked to the selected preset by DSH's normal non-empty-session rule.

Remove

dsh plugin --profile web remove dsh-auto-preset-router
dsh plugin --profile tui remove dsh-auto-preset-router

Existing sessions retain the preset recorded in their durable history. A local $DSH_HOME/.agent-presets/auto directory, if present, is shadowed while this bundle is installed and is never modified. Removing the bundle removes its roster contribution on the next process start.

Privacy and failure behavior

The first prompt text is sent to DeepSeek V4 Flash even when the session uses a different model. Prompts over 24,000 characters are reduced to their beginning and end for classification. Image-only prompts and classifier failures route to standard. The original message is not rewritten.

Development

npm test
npm run check
npm pack --dry-run

With a configured TUI profile and DeepSeek credentials, the optional live gate runs one fresh session for each target (and creates four short session logs):

npm run test:live:tui

The repository uses the current DSH plugin distribution contract: package.json declares dsh.bundle.patch, and cordis.patch.yml composes the package through dsh plugin --profile … add ….