Introduction¶
When engaging in multilingual conversations within DeepSeek Harness (DSH), a common scenario is: you write prompts in Chinese, expect the main model to reason in Japanese, and then read the thoughts and final answers in Chinese on the interface. Simply requesting “Please answer in a specific language” in the system prompt often fails to separately control “translating input before sending,” “preserving the original text for display,” and “translating model output back to the reading language.”
The following is an introduction to the community plugin dsh-prompt-translation (maintainer EPCN-fla). It integrates translation into the DSH conversation pipeline, using content-level switches to determine which steps to translate. Configuration is written into the current Profile’s cordis.patch.yml without the need for separate storage. The plugin is categorized as “Model Inference” in the SkillHub directory; the repository description is: Prompt, reasoning and response translation for DeepSeek Harness.
What is this¶
dsh-prompt-translation is a dual-side plugin for DSH: The Host side handles the translation interface, reuses existing model calls, and intercepts conversations; the Web client side provides a settings card and an input box shortcut menu. Users can configure languages and translation methods in “Plugins → dsh-prompt-translation” and use the “Translate” menu to the right of the “Permissions” icon in the input box to quickly enable/disable or switch languages. Changes to settings apply to all sessions within that Profile, generally without requiring a plugin restart.
Core Features¶
The following capabilities are derived from the project README and package.json descriptions.
Independent Content Switches¶
You can separately select whether to translate:
- User prompts (System prompts are not translated)
- Model reasoning content
- Model output content
Tool call parameters, tool results, injected context, images, and file blocks remain unchanged and are not translated.
Language Direction and Auto-detection¶
The source language supports auto-detection; the target language must be explicitly specified. Language options include Simplified Chinese, Traditional Chinese, English, Japanese, Korean, French, German, Spanish, Russian, Portuguese, Italian, Arabic, and Hindi, though actual availability depends on the selected translation provider.
Direction Rules: User prompts are translated “Source → Target”; reasoning and answers are translated back to the source language. For example, Simplified Chinese → Japanese will translate the input into Japanese, and translate the selected reasoning and answers back into Chinese. When the source language is auto-detected, the user input of the current turn is used to determine the back-translation language.
Legacy APIs and DSH Internal Models¶
- Legacy Translation: Baidu, Google, DeepL, Microsoft official APIs (The README lists the required configuration and API versions for each service).
- Agent Translation: Uses the DSH configured Provider ID and Model ID, as well as optional reasoning effort; auxiliary translation calls do not provide tools and will generate additional model requests and costs.
Keys are passed to the Host via the DSH settings interface, stored in the secret field, and the browser does not call the providers directly.
Display and Trace Comparison¶
Chat bubbles can display the original user text; in the trace, user records can view the original text, the actual sent translation, and the language direction under “Preview” and “Raw Content”. Reasoning and answers in assistant records can also view content before and after translation. Display occurs after the complete block is translated; when translation is enabled, translated text is no longer streamed token-by-token.
Configuration Persistence¶
The settings namespace and Loader row ID are both prompt-translation. Saving uses the DSH settings service; if a concurrent write conflict occurs, it will re-read and retry once.
Installation and Activation¶
The current plugin version is 0.1.1 (MIT License). The compatibility with DSH is as follows:
| Plugin Version | Compatible DSH Version |
|---|---|
| 0.1.0 ~ 0.1.1 | ≥0.2.0-rc.1 <0.2.0 || ≥0.2.1-rc.1 <0.2.1 |
The following commands will add the plugin to the specified Profile (The example Profile is web). The package includes cordis.patch.yml; DSH will automatically mount the Host and load the Web client module.
Install from npm (after the package is published):
dsh plugin --profile web add dsh-prompt-translation
Install from GitHub (after the repository is published):
dsh plugin --profile web add github:EPCN-fla/dsh-prompt-translation
Git source installation requires allowing the package manager to execute prepare and complete the build; if installation scripts are prohibited, please use the pre-built npm package.
For local development, you can point to a built working copy (you need to run npm run build again after changing the source code):
dsh plugin --profile web add /absolute/path/to/dsh-prompt-translation
After installation, restart the DSH Web and refresh the page. Run the following command to confirm that the output contains a plugin row with the ID prompt-translation:
dsh --profile web --dump-config
Uninstallation example:
dsh plugin --profile web remove dsh-prompt-translation
After uninstallation, you need to restart the Profile and refresh the page; persisted translations will be retained.
Typical Usage¶
1. Configure Translation Method in Web¶
Open “Plugins → dsh-prompt-translation”. The plugin disables translation by default. Expand the translation card, select the translation type and configure the service, then check “Enable Translation” and save.
When selecting “Agent”, fill in the existing provider, model, and optional reasoningEffort. When selecting legacy services, fill in the App ID, API Key, Region, or DeepL Free/Pro fields according to the README table. Leaving the key input box empty retains the existing value; when switching services, you need to fill in the new service key.
2. Select Language and Translation Scope¶
Set “Source Language → Target Language”, and check user prompts, reasoning, and output. If only back-translation is needed, you can turn off user prompt translation.
In the input box of an existing session, the translation icon to the right of “Permissions” in the bottom left corner allows for quick enabling/disabling and language switching: a strikethrough indicates off, and no strikethrough indicates on. Changes apply to all sessions in the current Profile.
3. Pre-configure or Verify Configuration in YAML¶
Deployers can pre-configure in the config of the corresponding plugin row in cordis.patch.yml, for example, Agent mode:
- id: prompt-translation
name: dsh-prompt-translation
config:
enabled: true
source: auto
target: zh
type: agent
provider: your-existing-provider
model: your-existing-model
reasoningEffort: low
userPrompt: false
reasoning: true
output: true
timeoutMs: 60000
maxChars: 2000
Legacy mode uses type: traditional, and sets engine (baidu / google / deepl / microsoft) and apiKey, etc.; do not commit real keys to the repository. See the README for default values of common fields (e.g., enabled defaults to false, target defaults to en, timeoutMs defaults to 60000, maxChars defaults to 2000).
4. Effective Timing¶
After saving, the next user submission reads the new configuration; the prompt and back-translation of a single turn share the configuration snapshot of that turn. User prompts are translated at the agent/pre-step stage; reasoning and output are translated after the complete text block is generated. If input translation or language detection fails, the original user message will still be recorded and displayed, and an explicit error will be thrown before calling the main model; the original text will not be silently used to continue sending.
Use Cases and Notes¶
Who is it for: Developers and users who need to perform cross-language input in DSH, read model reasoning and answers in their native language, or want to reuse existing translation APIs / configured LLMs for translation without repeating translation instructions in every prompt.
Same Language and Costs: When explicitly selecting the same source and target languages, user prompts will skip translation; however, the auto-detection mode may still call the translation service. Reasoning and answer back-translation will currently still call the service even if the user language is the same as the output. Identical text before and after translation does not mean no request was made; there may still be latency and costs.
Scope and Limitations (Explained in README): The Web interface provides settings and shortcut buttons; other interfaces can use the Host pipeline but lack the shortcut menu. Long text will be translated in segments; legacy APIs do not guarantee that code and Markdown remain verbatim. The plugin runs with the permissions of the current DSH process; before installation, please read the source code and the MIT license, and evaluate the billing and security policies of third-party APIs and model calls yourself.
The DSH ecosystem emphasizes “Everything is a plugin”; the SkillHub directory page is a community collection site and has no official affiliation with DeepSeek / High-Flyer.
Conclusion¶
dsh-prompt-translation splits the translation of user prompts, reasoning, and answers into configurable switches, integrates into DSH’s Host and Web client, and supports both legacy APIs and existing models as backends. If you frequently switch between working languages and reading languages in the Harness, you can install it via the commands above and enable it in your Profile.
- Directory Page: https://www.skillhub.cn/plugins/EPCN-fla/dsh-prompt-translation
- Source Code & Documentation: https://github.com/EPCN-fla/dsh-prompt-translation