beidou6972yh/dsh-bw-router ↗★ 0
dsh-bw-router
B&W (小棒 & 灰狼) — DSH plugin: plan a task into stages, pick the right model per stage, and switch models inside one session without losing context.
インストール
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add https://github.com/beidou6972yh/dsh-bw-router/releases/download/v0.2.0/dsh-bw-router-0.2.0.tgzドキュメント
README 全文を読む ↗使用
- 正常对话;需要路由时在输入区勾选「路由模式」(若已安装
dsh-router-mode,草稿会带上[路由模式]标记),或直接说明「按路由模式执行」。 - 点击输入区旁的 生成计划(或调用 HTTP 接口),插件会把任务拆段并分配模型,计划卡出现在输入区上方。
- 在计划卡上点 确认开工,会话切到第 1 段模型;状态栏显示
[路由] 第 n/N 段 · 当前模型 · 已花 … · 下一段:…。 - 每段结束按状态栏提示推进;开工前可在计划卡上换某段模型。
HTTP 接口(同源,便于脚本/外部触发)
| 方法 | 路径 | 说明 |
|---|---|---|
| GET | /router/models | 模型发现(count/sources/filesRead/pricing) |
| POST | /router/plan | 生成分段计划与计划卡 |
| POST | /router/plan/confirm | 确认开工(可带 sessionId) |
| POST | /router/plan/swap | 开工前给某段换模型 |
| GET | /router/state | 状态栏数据 |
| GET | /router/card | 计划卡数据 |
| POST | /router/switch | 切到某段模型 |
| POST | /router/stage/finish | 段末记账 |
| GET | /router/wizard、/router/context、/router/reconcile | 只读辅助视图 |
curl -s -X POST http://127.0.0.1:3080/router/plan \
-H 'content-type: application/json' \
-d '{"taskId":"demo-1","stageNames":["分析","实现","验收"],"estimatedInputTokens":5000}'