@fonlan/dsh-model-router
DSH plugin: a virtual model-router provider that aggregates every configured provider and model, routes each request to the model's currently active provider, and ships a settings page for per-model provider ordering and switching. 适合配置了多个 API 渠道,需要灵活调度和切换模型后端的复杂用户。
설치
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:fonlan/dsh-model-router配置
路由配置持久化在 settings 文档的 model-router 命名空间(~/.dsh/settings.yaml):
model-router:
showQuickSwitch: true # 是否在模型选择菜单中显示提供商切换入口(默认 true)
ignoreModelIdPrefix: true # 匹配时忽略模型 ID 前缀(默认 true)
modelSort: custom # 模型显示顺序:custom | name | recent(默认 custom)
modelOrder: # custom 模式下的模型显示顺序(自动维护,无需手写)
- deepseek-v4-flash
- qwen3.7-max
recentlyUsed: # recent 模式使用:模型 id → 最后使用时间戳(自动维护)
deepseek-v4-flash: 1787036509332
models:
deepseek-v4-flash:
order: # 优先级顺序(供后续自动切换使用)
- opencode-go
- deepseek-official
active: opencode-go # 当前实际使用的提供商
order 与 active 分开维护:点击切换只改 active,拖拽排序只改 order。modelOrder 与 recentlyUsed 由插件自动维护(modelSort: recent 时每次模型请求都会更新对应时间戳,防抖写入)。