jiayuxuan123/dsh-reasoning-zh0

dsh-reasoning-zh

DeepSeek Harness 插件:把「推理等级」(reasoning effort) 档位名翻译成中文,并为接入的自定义第三方模型注入推理等级显示(官方 DSH 默认不注入),所选档位写入出站请求体。

AI Analysis

核心用途是汉化推理等级界面,并强制让不支持推理控件的第三方模型也能选择和发送推理档位。适合使用第三方大模型且需要精细控制推理强度的中文用户。

Package
dsh-reasoning-zh
Version
0.2.0
License
MIT
Last updated
Aug 15, 2026

Install

This plugin has no verified bundle, or compatibility checks failed. Read the repository notes first. Read the full README ↗

dsh-reasoning-zh

npm version License: MIT

DeepSeek Harness(DSH)Web GUI 插件:把「推理等级」(reasoning effort)档位名翻译成中文,并让接入的自定义第三方模型也能显示推理等级。

  • 翻译:模型选择器里的「推理等级」档位名(Off/Low/Medium/High/Max/Default 等)显示为中文。
  • 注入:官方 DSH 不会为未声明推理等级的第三方模型显示「推理等级」控件。本插件自动为这类模型注入档位(默认 off/high/max),并把所选档位写入出站 chat/completions 请求体(字段名可配置)。开箱即用,无需任何其它插件。

翻译表 / Translation table

id中文English
off关闭Off
minimal最小Minimal
lowLow
mediumMedium
highHigh
max最大Max
(provider 默认)默认Default

档位名(reasoning.efforts[].name)是纯展示字段,wire 层只使用档位 id,因此翻译/注入名称不影响请求行为;原生 DeepSeek 适配器(自带 reasoning 机制)只做翻译、不做 wire 注入。

工作原理 / How it works

  • 宿主半边lib/index.js):在 ctx.llm 适配器层包装 resolveModel / listModels(翻译 + 为未声明 reasoning 的模型注入档位)和 stream(把所选档位写入出站请求体),不修改任何官方 @deepseek-ai 包。
  • 客户端半边lib/client.js):MutationObserver 兜底,只对模型选择器内「整段等于英文档位名」的文本做精确替换,覆盖宿主侧尚未生效的数据与官方 zh 字典漏翻的 Default 文案。

安装 / Install

方式一(推荐,npm):

cd ~/.dsh/profiles/web
npm install dsh-reasoning-zh

方式二(源码,从 GitHub 克隆):

git clone https://github.com/jiayuxuan123/dsh-reasoning-zh.git "$HOME/.dsh/profiles/web/node_modules/dsh-reasoning-zh"

装好后,在 ~/.dsh/profiles/web/cordis.patch.yml 末尾追加(config 可选,全部有默认值):

- insert:
    - id: reasoning-zh
      name: 'dsh-reasoning-zh'
      config:
        enabled: true              # 总开关(默认 true)
        injectThirdParty: true     # 为未声明 reasoning 的第三方模型注入档位(默认 true)
        levels: [off, high, max]   # 注入的档位 id 列表(默认 off/high/max)
        defaultLevel: high         # 注入档位的默认选中项(默认 high)
        wireField: reasoning_effort # 出站请求体字段名(默认 reasoning_effort)

profile 的 HMR 会热生效;刷新页面(Ctrl+R)加载客户端半边。修改 config 后 HMR 会以新配置重跑宿主半边。

首次安装或更新 lib/ 后,需要重启一次服务(插件市场 →「立即重启服务」,或重启 DSH Desktop)让新的宿主代码生效。

卸载 / Uninstall

删除 cordis.patch.yml 里的 reasoning-zh insert 块,再删除 node_modules/dsh-reasoning-zh/ 目录。

License

MIT