dsh-dual-auto
其他 活跃维护

dsh-dual-auto

lengquan88/dsh-dual-auto

支持双模型自动分流路由,可配置低成本直连与高成本升级策略,搭配逃逸学习闭环机制,无需人工干预即可动态匹配最优模型调用链路,平衡使用成本与响应质量。

1
Stars 标星
0
Forks 分支
1
Watchers 关注
0
Open Issues
TypeScript
主要语言
MIT
开源协议
41 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:lengquan88/dsh-dual-auto
git clone https://github.com/lengquan88/dsh-dual-auto.git
git clone git@github.com:lengquan88/dsh-dual-auto.git
README.md main

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

License

MIT