DeepSeek Harness Plugin

Mu-scorpio/dsh-reasoning-effort

Stars ★ 9 Downloads (30d) 2,047 Category Models & Providers Added 2026-08-30 npm dsh-reasoning-effort

Configures provider and model reasoning-effort mappings for DeepSeek Harness, with a grouped model picker and composer slider.

Install

# from npm (prebuilt)

dsh plugin --profile web add dsh-reasoning-effort

# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)

dsh plugin --profile web add github:Mu-scorpio/dsh-reasoning-effort

Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).

README

This plugin publishes its README in Chinese only.

Archived — Superseded by Native DSH Support

This plugin was originally developed to enable configurable model reasoning effort in DSH. Since DSH now supports this functionality natively, this project is no longer maintained.

The repository remains available for historical reference and learning purposes.

为 DeepSeek Harness 中的任意模型设置推理强度,并在最高档点亮紫色动态特效。

dsh-reasoning-effort 用来补齐和管理模型的推理强度配置。不限制 Provider 或模型品牌:只要模型已经接入 DeepSeek Harness,就可以为它声明默认等级、模型级覆盖和实际协议值映射。

模型选择器与最高推理强度特效

模型选择器按 Provider 折叠分组;可以为任意已接入模型配置推理强度,滑到最高级时会出现紫色辉光、边缘闪烁和拖尾特效。

推理强度滑块动效

滑块会实时显示当前档位;到达最高级时,紫色发光效果会持续提示当前状态。

核心能力

  • 为任意已接入 Harness 的模型配置推理强度,不受 Provider 限制;
  • 零配置自动发现当前 llm-pi-ai 中的全部现有 Provider;
  • 支持 off、minimal、low、medium、high、xhigh 和 max 等等级;
  • 支持 Provider 默认值、模型级覆盖和协议 wire 值映射;
  • 模型选择器按 Provider 分组折叠,先选 Provider,再选模型;
  • 推理强度滑块采用粗轨道和离散档位,最高档带紫色辉光、闪烁和拖尾;
  • 模型切换先在前端暂存,关闭选择框时再提交,避免界面闪回;
  • 以追加方式更新 settings,不覆盖已有声明。

安装

将 npm 上已构建的 Bundle 安装到 DSH web profile,然后重启正在运行的 Harness:

dsh plugin --profile web add -w dsh-reasoning-effort
dsh web

包已经发布了预构建产物,正常安装不需要从源码编译插件。

配置

默认不需要写 Provider 名称。插件会从 llm-pi-ai settings 自动发现当前电脑上已经存在的全部 Provider,并为其中缺少声明的模型补齐通用推理档位。因此,Bundle 不再把 cliproxyapi、jyld 或任何其他名称当作默认白名单。

只有特殊网关需要不同 wire 值、需要排除某个 Provider,或需要单独处理模型时,才在 Cordis patch 中加入覆盖:

- insert:
    - id: reasoning-effort
      name: dsh-reasoning-effort
      config:
        defaults:
          reasoning: medium
        providers:
          special-provider:
            api: openai-responses
            efforts:
              high: reasoning_high
            models:
              non-reasoning-model:
                disabled: true
          excluded-provider:
            disabled: true

配置字段

字段 作用
auto 是否自动发现全部现有 Provider,默认 true;设为 false 时只处理 providers 中显式列出的项。
defaults.api 当 Provider 自身没有 api 时使用的协议回退值。
defaults.reasoning 为所有 Provider 补充默认推理等级,但不覆盖已有值。
defaults.efforts 覆盖所有 Provider 的通用 wire 值映射。
providers.<id>.api 为指定 Provider 选择协议默认映射。
providers.<id>.reasoning 为指定 Provider 补充默认推理等级。
providers.<id>.efforts 覆盖指定 Provider 的 wire 值映射。
providers.<id>.disabled 排除指定 Provider。
providers.<id>.models.<model-id>.efforts 单独覆盖某个模型的映射。
providers.<id>.models.<model-id>.disabled 显式标记某个模型不使用推理强度。

Harness 支持的等级为 off、minimal、low、medium、high、xhigh 和 max。内置协议映射覆盖 low 到 max 五个常用等级;特殊网关可以自行提供对应的实际值。

Provider 必须已经存在于 llm-pi-ai settings 中。插件只增强现有 Provider,不会重新创建已经被删除的 Provider。

输入框推理条

浏览器端会读取当前模型公布的推理等级,把这些等级绘制成离散滑块,并通过 DSH 共享的模型目录提交选择。拖动过程中,文字、填充条和最高档特效在前端实时更新;松手后才把最终强度提交给后端。

模型选择器中的模型切换也采用前端暂存机制:点击模型时立即更新界面,但不会立即改写后台模型;关闭选择框时,最后选中的模型和推理强度才会一起提交。这样可以避免后台旧状态回写造成闪回。

没有推理元数据的模型不会显示空控件。

默认安全策略

这个插件可以和已有 DSH 配置并排工作:

  • 已有的 reasoningEfforts 永远不会被覆盖,包括 false;
  • 模型中与推理无关的字段保持不变;
  • llm-pi-ai 延迟注册时会短暂重试;
  • settings 更新后会重新执行一次追加同步;
  • 不新增 Provider 凭据、请求、工具或遥测。

换句话说,它只准备好 settings 契约,具体的模型控制仍交给 DSH 自己完成。

本地开发

通过本地 overlay 运行与发布 Bundle 相同的配置:

pnpm install
npm run build
dsh web --patch ./cordis.yml

cordis.yml 会挂载 src/index.ts,并使用与 Bundle patch 相同的零配置自动发现行为。

许可证

MIT

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →

Community comments

Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.