Skip to content
dsh.fish
Bundle

dsh-model-controller

Semantic model routing plugin for DeepSeek Harness

Source
jadehare
stars
1 stars
License
MIT
Updated
Updated yesterday

Readme

# dsh-model-controller

中文 | [English](docs/README.en.md)

把本插件安装进 DSH profile 后,每个用户 turn 会自动选择一次模型:先按关键词做正则匹配,未命中再走语义分类。

当前版本要求 DeepSeek Harness `0.1.1-rc.2` 或兼容版本。

## 默认路由

| 场景                               | 模型                | Reasoning |
| ---------------------------------- | ------------------- | --------- |
| 复杂结构(`v4pm`、`重构`、`设计`) | `deepseek-v4-pro`   | `max`     |
| Review(`review`)                 | `deepseek-v4-pro`   | `high`    |
| 小脚本(`v4fm`)                   | `deepseek-v4-flash` | `max`     |
| 小方法(`v4fh`)                   | `deepseek-v4-flash` | `high`    |
| 处于 Plan Mode                     | `deepseek-v4-pro`   | `max`     |
| 语义分类器(未命中时)             | `deepseek-v4-flash` | `off`     |

未命中时保留 Agent 的原始模型。选定路由在整个 turn 内有效。

## 设置开关

打开 **设置 → 插件 → 插件配置**。保存后从下一个用户 turn 起生效。

- **全局匹配模式** — 混合模式(先正则,再语义)、仅 Semantic、仅 Regex。
- **Route 规则** — 增删改排序路由;可恢复内置默认表。
- **Semantic 分类器** — 仅在混合 / 仅 Semantic 需要分类时使用。
- **Plan Mode** — 处于 Plan Mode 时强制使用专用 Pro/max 模型。
- **路由元数据** — 在 reasoning 开头显示 provider、模型、推理强度和 Route id。

## 安装

```sh
dsh plugin --profile web add dsh-model-controller@next
dsh web
```

从本仓库安装时先构建,再安装当前目录:

```sh
pnpm install
pnpm run build
dsh plugin --profile web add .
```

卸载:`dsh plugin --profile web remove dsh-model-controller`。

Install

dsh plugin --profile web add github:jadehare/dsh-model-controller#28d2f82b18cbb7ed554c871dc98e6f5d906f03e5

Profile: web

  • This package builds from source on install. pnpm will ask you to allow its build script — that is permission to run the package’s code on your machine, outside the agent sandbox. Only allow sources you trust.
Source