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
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:PerryLink/dsh-translate说明文档
阅读完整 README ↗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.
| Key | Default | Meaning |
|---|---|---|
enabled | true | Master switch; false registers nothing |
repair.enabled | true | Post-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.escapeRepair | true | Escape raw control characters inside strings |
repair.strategies.trailingComma | true | Remove commas directly before a closing bracket |
repair.strategies.truncationClosure | true | Close an unclosed string or container cut off by truncation |
repair.strategies.fieldCompletion | true | Complete missing required fields with explicit null placeholders |
repair.maxSteps | 8 | Strategy application budget (repair-loop passes, 1..64) |
diffMaxChars | 200 | Cap on one logged diff fragment, in characters |
diffMaxEntries | 50 | Cap on logged diff entries |
registerCommand | true | Register the /translate command |
registerTool | true | Register 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