JianTG/dsh-auto-model-router0

dsh-auto-model-router

dsh-auto-model-router:DSH 自动模型路由插件。根据任务复杂度在基线模型(如 flash)与升级模型(如 pro)之间自动路由,支持基于长度和关键词的分类器。

AI 分析

核心用途是平衡对话质量与 API 消耗成本。适合希望简单日常提问用廉价模型、复杂重构或分析任务自动升级到高性能推理模型的使用场景。

套件
dsh-auto-model-router
版本
0.1.0
最近更新
2026年8月16日

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:JianTG/dsh-auto-model-router

1. 装进 web profile(自动注册,无需改任何配置文件)

dsh plugin --profile web add

配置(~/.dsh/settings.yamlauto-model-router 段,热更新)

auto-model-router:
  enabled: true                    # 总开关
  baseProvider: deepseek-official
  baseModel: deepseek-v4-flash     # 基线模型(插件只管理这一对的升级/回落)
  proModel: deepseek-v4-pro        # 升级目标
  upgradeReasoningEffort: high     # 升级到 pro 时的推理强度(off/high/max)
  classifierEnabled: true          # 中间态是否调用 flash 分类器
  classifierTimeoutMs: 3000
  lengthStrong: 400                # 去空白长度 ≥ 此值 → pro
  lengthWeak: 40                   # 去空白长度 ≤ 此值 → flash
  keywordsStrong: [重构, 架构, 设计, 排查, 分析, 审计, 优化, 测试, 实现, 开发, 修复, bug, 多文件, 批量, review, 迁移, 方案, implement, debug, refactor, migrate, migration, optimize, architecture, deploy, plugin]