lengquan88/dsh-dual-auto
Dual-model auto-routing plugin for DeepSeek Harness: low-cost direct / high-cost upgrade + escape-learning closed loop
Project Overview项目介绍
This is a dual-model auto-routing plugin for DeepSeek Harness. It builds a closed-loop escape learning system for low-cost direct responses and high-cost upgrades, auto-routing requests to DeepSeek v4 Flash or Pro based on six criteria. Use it when you need to balance LLM invocation cost and output quality. Configure the persistence path correctly to retain routing state.
这是DeepSeek Harness的双模型自动路由插件,可实现低成本直出、高成本升级的逃逸学习闭环,能根据六项指标自动将请求路由至DeepSeek v4 Flash或Pro版本,支持自动降级并持久化存储路由状态。需要平衡大模型调用成本与效果时使用,需正确配置持久化路径才能保存路由状态。
请帮我了解并安装插件:【dsh-dual-auto】【https://github.com/lengquan88/dsh-dual-auto】
Send this message to DSH in your current session. CLI install commands may not be accurate across systems — DSH will figure it out for you.把上面这条消息直接发给当前会话里的 DSH,让它帮你了解并安装。安装命令不一定准确,发给 DSH 更稳。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add github:lengquan88/dsh-dual-auto
把 lengquan88/dsh-dual-auto 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-dual-auto
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
- npm: https://www.npmjs.com/package/@lengquan88/dsh-dual-auto
- Source mirror (atomgit): https://atomgit.com/guaikepa/zhonghua/tree/main/dsh-dual-auto
License
MIT
Han-1413141/dsh-cost-meter
Ychris12138/dsh-usage-stats
slywalker2006/dsh-passwords
songoao25/dsh-bottom-info-bar
LiZhenNet/dsh-antigravity
dingminhua/dsh-connect-trae
wenzetan/dsh-quota-panel