dakouchiya/dsh-auto-router ↗★ 0

dsh-auto-router

Per-turn model and reasoning-effort routing for DeepSeek Harness: classify what the turn asks, switch provider/model/reasoningEffort, show the tier in the composer, and re-route mid-turn.

パッケージ
dsh-auto-router
互換性
未検証
Harness ピア範囲
>=0.2.1-rc.1 <0.2.2-0 || >=0.2.2-0 <0.3.0-0
バージョン
1.1.0
ライセンス
MIT
最終更新
2026/11/06

同名パッケージの別リポジトリ

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add https://github.com/dakouchiya/dsh-auto-router/releases/download/v1.1.0/dsh-auto-router-1.1.0.tgz

ドキュメント

README 全文を読む ↗

配置

写在 profile 的 cordis.patch.yml(用户层,升级不丢):

- id: auto-router
  config:
    enabled: true
    dryRun: false          # true = 只记录决策,不改模型(演练模式)
    mode: balanced         # economy | balanced | quality,写进分类器的倾向
    provider: deepseek-account
    tiers:
      lite:     { model: deepseek-flash,    effort: 'off' }
      standard: { model: deepseek-flash,    effort: high }
      deep:     { model: deepseek-flash,    effort: max }
      max:      { model: deepseek-v4-pro,   effort: high }
      ultra:    { model: deepseek-v4-pro,   effort: max }
    classifier:            # 每轮开头用于判档的小模型
      enabled: true
      model: deepseek-flash
      effort: 'off'
      timeoutMs: 6000      # 超时即退回结构规则,不阻塞这一轮
      maxInputChars: 3000
    approval:              # 升 pro 前的人工确认
      enabled: true
      windowMs: 15000
      modelPattern: pro    # 目标模型名匹配这个正则即视为 pro
      skipWhenPinned: false
    history:
      maxBytes: 2097152    # 单个 turn 日志上限,超过即轮转并归档
    logDecisions: true

effort 只接受 off / low / high / max(由当前模型能力决定)。若目标模型不支持配置的档位,会按 off→low→high→max 的阶梯就近收敛;模型本身解析不到时保持原配置不变,不会发出非法请求。