fonlan/dsh-model-router0

@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.

AI Analysis

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

Package
@fonlan/dsh-model-router
Version
0.2.1
License
MIT
Last updated
Aug 17, 2026

Install

$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