Introduction¶
Models have different preferred working languages: Claude and Gemini are typically configured in English, while some Chinese or multilingual models respond better to Chinese prompts. When mixing multiple models in the same session, it is difficult to cater to all of them using only one input language. Existing approaches generally involve manually rewriting prompts or switching to a proxy with a fixed language, operating at a global granularity. dsh-language-bridge lowers the granularity to “per model”: you input in your language, and the plugin translates the prompt into that model’s working language before sending it. After the model responds, the answer is translated back to your language and displayed in place.
What is this¶
dsh-language-bridge is a community plugin for DeepSeek Harness, maintained by tonyzdev, with repository version 2.0.0 and an MIT license. It intercepts user messages and responses within the session, using DeepSeek Flash for bidirectional translation. It specifies a working language rule for each model ID. Translation occurs within the DSH process; the interface displays the translated text, while the original text is stored in the message’s source.languageBridge field and is invisible to the model.
Core Features¶
Model → Language Rules¶
Rules form an ordered list. Model IDs are matched using regular expressions (case-insensitive), and the first matching rule takes effect; models without a matching rule remain unchanged. Three default rules are built-in:
| Model ID Regex | Working Language |
|---|---|
claude |
en |
gemini |
en |
(^\|[^a-z0-9])(chat)?gpt($\|[^a-z]) |
en |
The GPT rule includes word boundaries, matching gpt-5, openai/gpt-4o, chatgpt-4o, and gpt-oss, but avoids mistakenly matching IDs like egpt-1 or mygpt.
Your Language and Input Translation¶
- Supports any BCP 47 code (e.g.,
es,ja,zh-CN) orautoto follow the interface language. - Language detection is performed before sending; translation is skipped if the text is already in the target language.
- Code blocks, inline code, links, and
@pathare protected by placeholders and preserved as-is. - If the translation model drops placeholders, it will only translate the text between placeholders to ensure code and links are not lost.
Response Translation¶
- After each round, the response is replaced with the translation for display, providing “View Original / View Translation” in-place switching.
- Thinking content is not translated.
- If the response is already in your language, no translation is performed.
Maintain Working Language¶
- A rule is added to the system prompt for bridged models, instructing them to think and answer in the working language even if they receive tool outputs in other languages.
- This rule can only increase the probability and cannot enforce it.
Failure Visibility and Zero Cost for Same Language¶
- When translation fails, the original text is sent as usual, so the round is not lost, and a warning is displayed below the message.
- When your language is the same as the model’s working language (e.g.,
en-GBanden), no translation, system prompt, or cost is incurred.
Installation and Activation¶
Prerequisites: DeepSeek Harness must be installed (tested on macOS 0.2.1-rc.5) and configured with a DeepSeek API key or logged into a DeepSeek account; translation is performed by DeepSeek Flash.
The fastest way is to send the following message to any session in DSH to install it automatically:
帮我把 DeepSeek Harness 插件 https://github.com/tonyzdev/dsh-language-bridge 安装到当前 profile。有 plugin_manager 工具就直接调用 install_bundle 安装并启用;否则读取 profile 名(bash 用 $DSH_PROFILE,PowerShell 用 $env:DSH_PROFILE),运行 `dsh plugin --profile <profile> add github:tonyzdev/dsh-language-bridge`,profile 为 desktop 时用 app.asar 同级 runtime/cli/bin 下自带的 dsh(Windows 为 dsh.cmd);受沙箱限制时申请审批。不要手动改 profile 文件。
Alternatively, click “Add Plugin” on the “Plugins” page in Harness and enter the following address:
https://github.com/tonyzdev/dsh-language-bridge
After installation, click “Activate Now”; if the button does not appear, refresh the page or restart DeepSeek Harness.
Command line installation (first fully exit DeepSeek Harness):
DSH="/Applications/DeepSeek Harness.app/Contents/Resources/runtime/cli/bin/dsh"
"$DSH" plugin --profile desktop add github:tonyzdev/dsh-language-bridge
To remove:
"$DSH" plugin --profile desktop remove dsh-language-bridge
Typical Usage¶
Open “Plugins → Language Bridge”. Save changes to take effect starting from the next step; no restart is required. The fields include your language, model rules, and a test model ID. Regex patterns and language codes are validated instantly in the form, and saving is prevented if there are errors. The test model ID allows you to see which rule will be matched and whether translation is needed.
For example: You want to ask in Spanish, while Claude and Gemini use English, and a specific Chinese model uses Chinese. Keep the default claude→en and gemini→en, then add a zh-CN rule matching that Chinese model.
Configuration can also be written to cordis.patch.yml: use rules and userLanguage to set initial values, and provider (auto / deepseek-official / deepseek-account), translateInput, and translateOutput to adjust behavior. Plugin settings in $DSH_HOME/storages/language-bridge.json take precedence (DSH_HOME defaults to ~/.dsh).
Use Cases and Notes¶
This is suitable for developers working across multiple models in the same session where the models’ working languages are inconsistent: the interface uses one language, while each model uses its most comfortable language. Users with a single model and fixed languages will not see any benefit, and the plugin does not incur costs when languages are the same.
Please note:
- The plugin runs with the permissions of the current dsh process; you should check the source code and license (MIT) before installing.
- The system prompt rule can only increase the probability and cannot enforce it; the documentation mentions instances where models still answer in a non-working language.
- Only code blocks, inline code, links, and
@pathare protected; commands without backticks and citations will also be translated; a Chinese segment within an English sentence will also be translated. - Session logs and model inputs display the translations, with the original text only used for interface display; the response is switched to the translation only after a round is complete.
- Each uncached text segment constitutes a paid DeepSeek Flash request; paid results are stored in the session, so reopening it does not incur additional charges.
- Buttons and warning text support Chinese, English, Japanese, Spanish, French, German, Russian, and Portuguese (8 languages), while the settings page is available in Chinese and English only.
- Do not enable the official “Reasoning Translation” bundle simultaneously, as both hang a translator service and may conflict.
- Users upgrading from
claude-zh-bridgemust uninstall the old plugin before enabling this one, otherwise, translation will occur twice. This plugin maintains the same placeholders and chunking method, so paid translations in old sessions can be directly reused whenuserLanguageresolves tozh-CN.
Conclusion¶
dsh-language-bridge changes “what language the model should use” from a global setting to per-model controllable rules, using DeepSeek Flash to bear the translation cost and not swallowing messages upon failure. Directory page and repository:
- https://www.skillhub.cn/plugins/tonyzdev/dsh-language-bridge
- https://github.com/tonyzdev/dsh-language-bridge