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版本,支持自动降级并持久化存储路由状态。需要平衡大模型调用成本与效果时使用,需正确配置持久化路径才能保存路由状态。

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: directdeepseek-v4-flash, upgradedeepseek-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

上一个 Prev dsh-client-ui-skin-verdandi 下一个 Next dsh-ui-translate