DeepSeek Harness 插件

lengquan88/dsh-dual-auto

Star 数 ★ 1 下载量(近 30 天) 457 分类 工具与能力 收录于 2026-08-24 npm @lengquan88/dsh-dual-auto

双模型 Auto 路由插件:低成本模型直返 / 高成本模型升级 + 逃逸学习闭环(直返答错自动学习指纹,同指纹下次强制升级),状态持久化并与 Python ModelRouter 互通。

安装

# npm 包(预构建)

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

# Release 预构建包

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"

# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)

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

装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。

README

该插件的 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

内容来自项目 README(GitHub)↗

链接

同类插件

查看整个分类 →

社区评论

评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。