PerryLink/dsh-translate5

dsh-translate

Vendor parameter translation and deterministic JSON repair for DeepSeek Harness: the /translate command maps temperature/top_p/max_tokens/stop/system across 11 vendors, and the tools/post-execute repair layer (plus the fix_json tool) fixes broken JSON tool output with escape repair, trailing-comma removal, truncation closure, and required-field completion — never fabricating data

AI Analysis

适合需要跨多厂商模型对齐参数,并自动修复损坏 JSON 输出的场景。

Package
dsh-translate
Version
0.2.10
License
Apache-2.0
Last updated
Sep 12, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:PerryLink/dsh-translate

Configuration

All tunables are Schemastery Config fields (changeable from cordis.yml). An id-targeted override replaces the whole row — restate every key you need. cordis.patch.yml documents each key inline.

KeyDefaultMeaning
enabledtrueMaster switch; false registers nothing
repair.enabledtruePost-execute repair layer switch
repair.toolNames[]Extra tool names whose JSON-text results may be repaired (on top of string-rooted / json-rooted schemas)
repair.strategies.escapeRepairtrueEscape raw control characters inside strings
repair.strategies.trailingCommatrueRemove commas directly before a closing bracket
repair.strategies.truncationClosuretrueClose an unclosed string or container cut off by truncation
repair.strategies.fieldCompletiontrueComplete missing required fields with explicit null placeholders
repair.maxSteps8Strategy application budget (repair-loop passes, 1..64)
diffMaxChars200Cap on one logged diff fragment, in characters
diffMaxEntries50Cap on logged diff entries
registerCommandtrueRegister the /translate command
registerTooltrueRegister the fix_json tool
rosettaDataPath(none)Optional external rosetta data file (same shape as the bundled lib/rosetta-data.json); overrides the built-in mapping table

Example override in your profile patch:

- insert:
    - id: dsh-translate
      name: dsh-translate
      config:
        enabled: true
        repair:
          enabled: true
          toolNames: ['emit-json']
          strategies:
            escapeRepair: true
            trailingComma: true
            truncationClosure: true
            fieldCompletion: true
          maxSteps: 8
        diffMaxChars: 200
        diffMaxEntries: 50
        registerCommand: true
        registerTool: true