fonlan/dsh-model-router0

@fonlan/dsh-model-router

DSH 插件:虚拟模型路由提供商,聚合所有已配置的提供商与模型,并提供优先级排序与切换设置。

AI 分析

核心用途是实现多 Provider 渠道的统一模型路由。适合配置了多个 API 密钥,需要根据优先级自动切换或在输入框下快速切换模型提供商的用户。

包名
@fonlan/dsh-model-router
版本
0.2.1
许可证
MIT
最近更新
2026年8月17日

安装

$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)
  models:
    deepseek-v4-flash:
      order:            # 优先级顺序(供后续自动切换使用)
        - opencode-go
        - deepseek-official
      active: opencode-go   # 当前实际使用的提供商

orderactive 分开维护:点击切换只改 active,拖拽排序只改 order