Skip to content
dsh.fish
Bundle

dsh-model-stage-router

DeepSeek Harness 插件:按工作阶段自动路由模型(对话/规划用 flash,实施用 pro)。

Source
Bxfjjb
stars
2 stars
Updated
Updated 20 hours ago

Readme

# dsh-model-stage-router

DeepSeek Harness 插件:按工作阶段**自动路由模型**——对话和规划用 flash(快、省),真正实施用 pro(稳、准)。

## 路由逻辑

| 阶段 | 模型 | 判定信号 |
|---|---|---|
| 对话 | flash(保持默认) | 无明确信号 |
| 规划 | flash | plan mode 活跃 |
| 实施 | pro | 本会话出现突变工具调用 |

**「进入实施」的判定**:会话内第一次调用以下任一工具后,该会话后续请求保持 pro:

- `write` / `edit`(写文件)
- `exit_plan_mode`(计划批准,开始动手)
- `subagent` / `subagent_fork` / `workflow` / `ralph`(委托执行)

## 安装

```sh
dsh plugin --profile web add git+https://gitee.com/god-bless-my-son/deep-seek-plugin.git
```

或本地 checkout:

```sh
dsh plugin --profile web add ./dsh-model-stage-router
```

## 配置

默认值已够用;如需调整,在 `$DSH_HOME/cordis.patch.yml` 覆盖 `model-stage-router` 行的 config:

```yaml
- id: model-stage-router
  config:
    flashModel: deepseek-v4-flash
    proModel: deepseek-v4-pro
    # 自定义触发「实施」的工具名单:
    mutatingTools:
      - write
      - edit
      - exit_plan_mode
      - subagent
      - subagent_fork
      - workflow
      - ralph
```

## 卸载

```sh
dsh plugin --profile web remove dsh-model-stage-router
```

## 说明

- 状态按 session 独立判定,进程内保存(重启后重置,不持久化)。
- 对话阶段不覆盖用户显式选择的模型,只保留 agent 默认(DSH 默认即为 flash)。
- 一旦进入实施,该会话保持 pro,直到会话结束。

Install

dsh plugin --profile web add github:Bxfjjb/Deepseek-Harness-plug

Profile: web

  • This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.
Source