Preface¶
DeepSeek Harness enables collaboration between agents, usually by invoking subagents to split tasks. By default, these subagents inherit the model configuration of the parent session. The dsh-submodel-change plugin allows users to choose which model drives a subagent when the AI decides to invoke one. This addresses the need to use different models for subagents when handling complex tasks (for example, using a reasoning model for logic and a standard model for summarization).
Plugin Overview¶
This is a DeepSeek Harness plugin maintained by Anna-la, classified under the “Model Reasoning” category. It uses the “replace LlmCallConfig” capability of the agent/request waterfall to intercept model routing before a subagent makes a request, enabling model selection.
Core Features¶
- Modal selection: In the GUI, when the AI determines that a subagent needs to be dispatched, a card appears in the session for the user to select a model.
- Zero dependencies: It does not depend on any
@deepseek-ai/*packages; it is pure JavaScript (ESM) and requires no build step. - In-process only: It only takes effect for
provider: spawn. Child events from other providers cannot reach this process, so they are skipped naturally and do not affect existing functionality. - Reuse and inheritance:
- By default, subsequent subagents in the same parent session reuse the first selection.
- Nested subagents automatically inherit the parent route and do not trigger cascading prompts.
Installation and Enabling¶
After installing the plugin, you must fully restart DSH Desktop for it to take effect.
Option A: Automatic Installation Script (Recommended)¶
Place the entire dsh-submodel-change folder in a stable location, for example:
C:\Users\Jason\Desktop\dsh-better\dsh-submodel-change\
Run the installation script in that directory:
node tools/install.mjs
The script automatically handles creating the junction and configuring cordis.patch.yml. If the patch file has been overwritten by another tool, run this command again to restore it.
Note: Do not mount it using
name: 'file:///...'incordis.patch.yml. Desktop treats such entries as “not installed”; even if the plugin is loaded, it cannot access theuserQuestions/llm/agentsservices, causing the plugin to fail.
Option B: Install as a Bundle¶
Run the following command in the parent directory of dsh-submodel-change:
dsh plugin --profile web add ./dsh-submodel-change
The uninstall command is:
dsh plugin --profile web remove dsh-submodel-change
Configuration Options¶
Add config: under the plugin line in the patch file to override the default values:
- insert:
- id: submodel-change
name: '@jason666not/dsh-submodel-change'
config:
enabled: true # 总开关
askOncePerParent: true # 同一父会话的后续子代理复用第一次的选择;
# 设为 false 则每个子代理都重新弹窗
allowDefault: true # 选项里包含「使用默认模型(跟随父级,不修改)」
extraModels: [] # 手动追加适配器目录未列出的模型路由,
# 格式 ['provider/model', ...]
How It Works¶
- Subagent detection: Intercepts requests that include the
origin: 'subagent'andparentSessionheaders. - Prompt location: It is triggered within the
agent/requestwaterfall and displays a prompt to the active root agent (viauserQuestions.ask). The prompt always occurs in the root session, and the UI card is also rendered in the root session. - Model injection: The user-selected
{ provider, model }is written back into the correspondingLlmCallConfig, and the subagent then uses that route to make the request. - Cleanup: The selection and prompt state are released during
subagent/end/agent/disposedevents.
Notes¶
- A full restart of DSH Desktop is required to load the services.
- It only works with
provider: spawn. - It depends on the
userQuestions/llm/agentsservices.
Conclusion¶
This plugin uses official extension points to provide flexibility in selecting models for subagents, making it suitable for agent developers who need fine-grained control over subtask execution under multi-model strategies.