Model capability editor: edit each model reasoning-effort levels and image-input (multimodal) declarations inline in the official model page, written back to settings.yaml as a whole group, with a floating entry as fallback when the anchor breaks.
Install
# from npm (prebuilt)
dsh plugin --profile web add @mzzsfy/dsh-model-capability-editor
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:mzzsfy/dsh-plugin#path:/packages/dsh-model-capability-editor
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.
DeepSeek Harness 模型能力编辑插件:编辑 llm-pi-ai 管理的第三方模型的 reasoningEfforts(7 个标准思考档位与每档线上值)与 input 多模态声明,经官方 settings RPC 整组写回 settings.yaml。
默认注入官方「模型」页:打开 provider 编辑卡并展开「自定义设置」后,再点击模型行末尾的高级箭头(展开上下文窗口/最大输出的官方设置区),该行展开区内即出现"模型能力"编辑块,行内直接编辑;点官方编辑卡的「保存」,行内能力草稿随之一并写入;收起箭头,编辑块随官方展开区一同消失,未写入的行内编辑保留在持久草稿表,重展开自动回显,随下一次官方保存写入,或被取消类操作(取消/换卡/关闭面板)丢弃。本插件不注册独立设置分区。官方 DOM 结构变化导致锚点失效时,自动在模型页右侧注入浮动"模型能力"入口,点开即完整编辑卡;注入恢复后浮动入口自动移除。
解决什么问题
- 手声明模型被当纯文本:图片附件被拒(
input未声明图像模态)。 - 推理档位拼写不可控:网关自有词汇需要
reasoningEfforts: { high: ultra }这类重命名。 - 需要显式禁用推理(
reasoningEfforts: false)或回到 host 默认(删除字段)。
功能
provider 选择(来源为 describe 返回的
providers键),列出各模型行(独立编辑卡形态,当前仅作为锚点破坏时的浮动回退面板呈现)。推理档位七档(off / minimal / low / medium / high / xhigh / max,与宿主 pi-ai
THINKING_LEVELS一致)开关(语义保留 checkbox,视觉为mce-switch开关形态)+ 每档线上值输入,判定表:勾选状态 写回行为 全不勾选 删除 reasoningEfforts字段(回到 host 默认)仅勾选 off,拼写留空 reasoningEfforts: false(禁用推理)off 勾选拼写留空,存在其他勾选档 对象形态 off: nulloff 勾选拼写填值 对象形态 off: "拼写"非 off 档勾选拼写留空 对象形态 档位名: "档位名"(线上值取档位名,拼写可选)input 四态:未声明(删除字段)/ 仅文本(
["text"])/ 文本+图像(["text", "image"])/ 仅图片(["image"],纯视觉网关不收文本输入)。档位拼写可选:留空即以档位名作线上值,输入框占位符即缺省值;仅网关需要重命名拼写(如
high: ultra)时才需填写。保存与校验反馈经全站浮出通知(@mzzsfy/dsh-toast可选依赖,缺失时降级 console)。一键草稿填充:卡片底部「填充草稿」对当前 provider 内未声明任何档位的模型填入七档全勾、拼写留空(线上值=档位名)的草稿;只改内存草稿,不触碰 inputMode,已声明档位的模型不受影响,写回仍需手动保存。
保存 = mutate set
providers.<route>.models整个数组:以 describe 读到的数组为基线,未编辑条目原样保留,settings 未声明的(自动发现的)模型不被删除;providers 缺失或 models 非数组时拒绝保存(防静默覆写为空数组)。修订冲突:重读 describe 取新 revision,按字段级 diff 仅重放本次修改(仅用户改过的模型条目的
reasoningEfforts/input两字段,其余字段保留最新文档值),重试一次;再冲突报错终止并保留用户输入,绝不静默覆盖。"本次修改"以草稿加载时点冻结的种子为参照:加载后他方对基线的修改,不会被零编辑或仅改单一字段的保存静默回滚(该保证覆盖保存开始后的并发写,revision 乐观锁语义)。settingswire 面缺失 / describe 失败 /writable === false:卡片显示具体原因并只读,绝不静默;describe 返回缺 revision 时拒绝盲写。保存随动:行内编辑即写入注入器持久草稿表(行内块会被官方随时重建,组件内存草稿活不到保存点击,故草稿生命周期独立于块),官方编辑卡「保存」点击即武装冻结快照;编辑卡随保存成功关闭后,插件以最新基线字段级合并补写——官方先写(含 models 数组)、插件后写,混合编辑官方字段与能力不再撞修订锁。保存失败/冲突卡未关闭时不补写;「取消」不写(解除性点击同时丢弃持久表)。重展开行时持久表中的未落盘编辑自动回显。
行内注入块:每模型档位与模态编辑,只在模型行的高级箭头点开后出现(挂官方条件渲染的展开区内,收起即随官方卸载),编辑随官方「保存」一并写入(语义见保存随动),无独立写入按钮。官方「保存」按钮文案无法识别时(宿主界面变更),行内块显示告警并停用,防编辑后无法落盘;此时可改用浮动「模型能力」卡(自带独立「保存」)。
安装
dsh plugin --profile web add @mzzsfy/dsh-model-capability-editor
重启 dsh 后,打开官方「模型」页任意 provider 的编辑卡,展开「自定义设置」,点击模型行末尾的高级箭头,行展开区内即出现"模型能力"编辑块;若官方结构变化导致注入失效,模型页右侧自动出现"模型能力"浮动入口作为回退。
前置:dsh 本体版本
支持 dsh 0.1.1-rc.2 / 0.1.2-rc.1 / 0.1.5-alpha.2(实测)。settings 传输按宿主代际自适应:
- 0.1.2+(boot wire 带
batches批次调度):remote.settings以点分 inject 声明交由 cordis 门控,fiber 等 namespace$mount完成才激活,激活即就绪。宿主parseBootManifest将batches校验为必填数组(缺失即整页拒绝启动),判据被上游 schema 钉死;宿主未来若移除该字段,本插件退化为 api 面或恒定禁用,不阻塞 boot。 - 0.1.1(旧 boot wire,无该 namespace):点分声明会永远 pending 拖垮整页 web boot,故声明两代基座
remote+connection,settings 传输在 apply 内异步定面轮询:从connection.api面起等,面在首拍即定型;缺失持续满等待窗(1s)则恒定禁用并告警,不影响 web 启动。
注意 0.1.1 本体的 llm-pi-ai schema 不认识 0.1.5 引入的 compat.chatTemplateArgs 字段,settings.yaml 中该字段会让 0.1.1 的 llm-pi-ai settings 注册整体失败(host 侧行为),编辑器随之无数据;从 yaml 删除该字段即恢复。
前置:移除 dsh-better-reasoning-effort
本插件与竞品 dsh-better-reasoning-effort 互斥,安装本插件前必须先移除竞品:
- 竞品的 host 端 autofill 是 settings 写者,其滑块也控制推理档位,共存即双写冲突。
- 迁移步骤:在 profile 中
pnpm remove dsh-better-reasoning-effort(并从 profile 捆绑包依赖里删去该行),重启 dsh,确认模型菜单滑块消失。 - 若竞品遗留了写入痕迹(模型条目上出现词汇表外的
reasoningEffortsUnset/inputUnset标记字段),本卡片初始化时会在状态区告警;这些字段不影响本插件读写,可顺手删除或保留。
本插件不做自动卸载他包的越权行为,移除竞品由用户完成。
覆盖范围
- 仅编辑
llm-pi-ai命名空间的providers;内置 DeepSeek 等非 llm-pi-ai 管理的 provider 不出现,写入也不生效。 - 编辑粒度为每模型的
reasoningEfforts与input两个字段;上下文窗口 / 最大输出 token 等 GUI 原生字段不在本卡片编辑。
测试
npm test
纯逻辑层单测(node --test,无外部依赖):档位四态判定表与拼写回填、input 四态(含纯图像)、一键草稿填充、整组写回基线合并、冲突字段级重放与一次重试判定、竞品痕迹检测、wire 信封适配(含 transport 抛错透传)与端到端冲突重放、client.js 与 logic.mjs 的 wire 适配段同源守卫,以及锚点判定、保存随动判定(按钮/编辑/快照/就绪/点击分类)、注入编排与生命周期、开关守卫、client id 等其余模块测试。
License
MIT
开发安装(仓库工作副本直挂,不经 npm 发布)
node scripts/dev-link.mjs dsh-model-capability-editor # 仓库根执行:归一 profile 依赖行 + 挂 junction
工作副本以 junction 挂进 profile,client 半区改动刷新页面即生效,无需发版;规约与全仓归一见仓库根 node scripts/dev-link.mjs all。
dsh 版本兼容
三版本全部通过:模型页行内能力面板注入。注入前提=模型行「容量 N」箭头展开高级设置区(0.1.5+/0.1.6 官方行为);0.1.6 插件 client 装载为聚合 URL 形态。激活 live、双 live findings 0。
Links
More in this category
V1ki/dsh-plugin-subscriptions★ 371
Use ChatGPT (Codex), Claude, and Grok subscriptions as DeepSeek Harness LLM providers, with Settings login, model catalogs, usage, plus image_generate, video_generate, and x_search tools.
Mars-Sea/dsh-commandcode-provider★ 277
Unofficial Command Code LLM provider: registers a `commandcode` route with a live model catalog and reasoning-effort support.
volcengine/ark-cli#ark-plan-api★ 132
Registers Ark Agent Plan, Coding Plan and postpaid model routes in the native DSH model picker.
corrinehu/dsh-workbuddy-connect★ 127
Brings the models in the WorkBuddy desktop app straight into DeepSeek Harness — zero configuration in the DSH chat.
franksong2702/dsh-codex-connect★ 112
Connect ChatGPT OAuth and OpenAI Codex models to DeepSeek Harness, with opt-in search and image tools.
Stormycry-cryp/dsh-AuthInOne★ 104
Adds account login, API and custom Provider setup, model switching, image fallback for text-only models, and token/cost attribution to DeepSeek Harness 47f.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.