DeepSeek Harness Plugin

lengquan88/dsh-dual-auto

Stars ★ 1 Downloads (30d) 457 Category Tools & Capabilities Added 2026-08-24 npm @lengquan88/dsh-dual-auto

Dual-model auto-routing plugin: low-cost direct / high-cost upgrade with an escape-learning closed loop (wrong direct answers auto-learn fingerprints, force-upgrading the same fingerprint next time), persisted and interoperable with the Python ModelRouter.

Install

# from npm (prebuilt)

dsh plugin --profile web add @lengquan88/dsh-dual-auto

# from a prebuilt release tarball

dsh plugin --profile web add "https://github.com/lengquan88/dsh-dual-auto/releases/download/v0.1.2/lengquan88-dsh-dual-auto-0.1.2.tgz"

# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)

dsh plugin --profile web add github:lengquan88/dsh-dual-auto

Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).

README

Dual-model auto-routing plugin for the DeepSeek Harness (dsh).

Low-cost direct / high-cost upgrade with an escape-learning closed loop.

Install

pnpm add @lengquan88/dsh-dual-auto

Enable

Add one row to your profile's cordis.patch.yml:

- insert:
    - id: dual-auto
      name: '@lengquan88/dsh-dual-auto'

Restart dsh web. The tools dual_model_route, dual_model_run, and dual_model_mark become available in every session.

Tools

Tool Purpose
dual_model_route Six-criteria routing decision (length / context / domain coverage / rule conflict / confidence / novelty → six labels). Fingerprints that escaped once are force-upgraded.
dual_model_run Decision + real model call: direct → deepseek-v4-flash, upgrade → deepseek-v4-pro (auto-degrade to flash on failure, marked degraded). Probe tasks auto-validate against a gold set — wrong direct answers trigger escape learning.
dual_model_mark Mark the quality of a direct result. correct=false learns the fingerprint and rewrites the disk log marker; the same fingerprint is force-upgraded next time.

Persistence

State persists to output/dsh_router_{fingerprints,stats}.json and dsh_router_decision_log.jsonl — interoperable with the project's Python dao/model_router.py (v2 dict fingerprints load directly).

Links

License

MIT

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →

Community comments

Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.