Apache-2.0 的純主機端 dsh 外掛程式:`/translate` 背後的 13 × 11 廠商參數表,加上一層有界、失敗關閉的 JSON 修復,絕不編造數值,也絕不把失敗的工具結果翻成成功。
DSH 整合
原生執行環境
作者聲明
安全稽核
未稽核
最後核實
2026-11-10
授權條款
Apache-2.0
01它能幫你完成什麼?
把標準請求參數對應到各家廠商的真實欄位名稱,讓同一份請求跑通每一家
`/translate` 查詢(廠商、參數,或兩家之間單參數對應),以及經 `lib/rosetta.mjs` 的 `transformRequest` 整包轉換請求
把 DeepSeek Harness 接到多家 LLM 廠商、仍在手動轉譯 `max_tokens`、`top_p`、`system` 等欄位的人
把成功工具結果裡的壞 JSON 修到能通過 schema 驗證,且不編造數值
`tools/post-execute` 修復層與 `fix_json` 工具:擷取圍欄、解析,再依策略做有界文字修復,最多 `repair.maxSteps` 輪
自建工具輸出字串化 JSON、偶爾出現截斷/尾逗號/缺必填欄位的 agent 開發者
02如何將外掛接入 DeepSeek Harness?
先決條件
- DeepSeek Harness `>=0.2.1 <0.3.0`(README 相容性表;`engines.dsh` = `>=0.2.1-0 <0.3.0 || >=0.2.2-0 <0.3.0`)
- Node.js `^22.19.0 || >=24.9.0`
- 一個 profile 名稱——README 用 `web`
安裝步驟
- 01
從 npm 安裝:`dsh plugin --profile web add dsh-param-repair`
$ dsh plugin --profile web add dsh-param-repair
- 02
或從 git 安裝:`dsh plugin --profile web add github:PerryLink/dsh-param-repair`
$ dsh plugin --profile web add github:PerryLink/dsh-param-repair
- 03
或從 tarball 安裝:先 `pnpm pack`,再 `dsh plugin --profile web add ./dsh-param-repair-<version>.tgz`
$ dsh plugin --profile web add ./dsh-param-repair-<version>.tgz
驗證整合成功
- `dsh --profile web --dump-config | grep -A2 'id: dsh-param-repair'` 能看到外掛程式列
- 執行 `/translate openai ernie max_tokens`——README 顯示的輸出是 `max_tokens: max_tokens → max_output_tokens`
復原
- `dsh plugin --profile web remove dsh-param-repair`,或從 profile patch 裡刪掉該列
03DSH 整合程度與能力邊界
原生主機端 dsh 外掛程式(純 host JS、無瀏覽器半、無建置步驟):在官方 `commands` / `tools` 服務上註冊 `/translate` 指令與 `fix_json` 工具,並掛一個 `tools/post-execute` 監聽器負責修復層。bundle patch 只 insert 自己那一列。
`/translate` 參數對應表
`vendors`、`params`,或 `<from> <to> [param]`→13 個標準參數對應到 11 家廠商的真實欄位名稱
`fix_json` 工具
`{ text, schema?, strategies? }`→`{ ok, repaired?, diff?, strategies, truncated, validated, error? }`,diff 片段有界且去識別化
post-execute 修復層
成功工具結果中標準值為 JSON 文字字串(string 根或無約束 `json` 根 schema,外加 `repair.toolNames`)→通過 schema 驗證的替換值;修不動就 `next()` 原樣放行
失敗送達的工具結果永不翻轉為成功`translate/fix` 稽核事件只記工具名、call id、策略名、編輯筆數與截斷旗標——絕不記載荷敵意輸入有界
呼叫端提供的任意 JSON Schema 子集→只接受 harness 工具註冊表同款關鍵字子集(`type`/`oneOf`/`properties`/`required`/`additionalProperties`/`items`/`enum`/`const`),其餘以不支援拒絕
`oneOf` 驗證受深度與分支預算限制,指數級 schema 無法耗盡行程
04適合誰?何時不該用?
適合
- 把 DeepSeek Harness 接到多家 LLM 廠商、仍在手動轉譯 `max_tokens`、`top_p`、`system` 等欄位的人
- 自建工具輸出字串化 JSON、偶爾出現截斷/尾逗號/缺必填欄位的 agent 開發者
不適合
- 修復只作用於標準值為 JSON 文字字串的成功結果;已因 schema 驗證失敗的結果以失敗送達,絕不翻轉。
05相容性、維護與安全提醒
- 修復只作用於標準值為 JSON 文字字串的成功結果;已因 schema 驗證失敗的結果以失敗送達,絕不翻轉。
- 本套件原名 `dsh-translate`(0.2.x),自 1.0.0 起改名為 `dsh-param-repair`;npm 名稱 `dsh-translate` 現屬另一個整頁翻譯外掛程式。`/translate` 指令、`fix_json` 工具、`translate/fix` 事件與全部設定鍵都沒變,遷移只需把 profile 列裡的套件名稱換掉。
- 在既不認識 `translate/fix`、又沒有 `ignorable` 信封的主機上,自適應門會跳過稽核寫入——工作階段日誌不被汙染,但這些版本沒有 in-log 稽核鏡像。
- 轉譯表涵蓋 11 家廠商 × 13 個標準參數;`extended` 列依公開 API 參考擴充(非上游三家),並在 `lib/rosetta.mjs` 中標註。
Apache-2.0 · 持續維護(最新 release v1.0.2,2026-11-09)· 社群外掛程式,與 DeepSeek 官方無關
06常見問題
修出來的值是編造的嗎?
不是。修復只做有界的文字手術:轉義修復、去尾逗號、截斷閉合、以明確 `null` 佔位補齊必填欄位。`null` 只在 schema 接受 `null` 時落地,否則以 `SCHEMA_VIOLATION` 失敗關閉。失敗送達的工具結果永遠以失敗回傳;上游的 LLM 重試臂刻意未移植。
會和其他外掛程式搶 `tools/post-execute` 嗎?
不會。這是 Cordis 的廣播事件,每個監聽器都會執行,誰也無法餓死別人。本外掛程式只在能交出通過驗證的替換值時認領呼叫,其餘路徑一律 `next()` 委派,絕不短路鏈條。
會呼叫模型、連網或讀憑證嗎?
都不會。整個外掛程式無網路、無子行程、無憑證,只消費官方 `commands` 與 `tools` 服務。參數對應是純資料查表,修復是純函式文字處理。
支援哪些 DeepSeek Harness 版本?
`>=0.2.1 <0.3.0`(`engines.dsh` = `>=0.2.1-0 <0.3.0 || >=0.2.2-0 <0.3.0`),已對照 `dsh-v0.2.1-alpha.1` 核驗,Node.js 需 `^22.19.0 || >=24.9.0`。
我之前用的是 dsh-translate,需要重新設定嗎?
不需要。自 1.0.0 起套件名稱改為 `dsh-param-repair`,但 `/translate` 指令、`fix_json` 工具、`translate/fix` 事件與全部設定鍵都沒變,只需把 profile 列裡的套件名稱換掉。
07相關的 DSH 工作流程
dsh-our-free-model
作者 ebony-vinyl
在 dsh 里装上这个插件即可,无需登录、注册或填 API Key,就能使用包括 DeepSeek V4.1 Flash、Kimi K3 在内的前沿模型——完全免费,不限量。 All you do is install this plugin in dsh: no login, no sign-up, no API key — the frontier models are just there, DeepSeek V4.1 Flash and Kimi K3 among them. Completely free, with no usage cap.
dsh-routing-suite
作者 yjh051108
DeepSeek Harness(dsh)路由套件:先装运行时注入器,再加载任务感知的推理模式路由预设(已实测 P1-P23)。
dsh-ops
作者 t-auto
A toolkit for low-level operations in DSH, designed to reduce token usage and task execution time / DSH 底层操作工具插件,旨在减少 Token 消耗与任务耗时
brooks-lint
作者 hyhmrright
基于 12 本经典工程书籍的 AI 代码评审工具,提供腐化风险诊断、书籍引用、严重度标签及 6 种分析模式。
08資料與來源
面向 DeepSeek Harness 的纯主机端插件:`/translate` 把 13 个规范参数映射到 11 家厂商,`tools/post-execute` 修复层与 `fix_json` 工具把成功工具结果里的坏 JSON 确定性…
整个插件无网络、无子进程、无凭据,只消费官方 `commands` 与 `tools` 服务
此頁面根據專案公開文件、儲存庫中繼資料與 DSH Plugins 的結構化解析所產生;最後核實於 2026-11-10。發現錯誤?提交更正。
最佳 DeepSeek Harness 外掛
從全目錄挑出的 12 個值得優先安裝的外掛,涵蓋各個分類。
