Introduction¶
The plugin ecosystem for DeepSeek Harness (DSH) allows developers to extend functionality without modifying core code. When developing complex workflows that involve subagents, developers typically set a model in the configuration UI, but during actual execution, routing retries, failover, or intermediate agent logic may change the model ultimately called. This discrepancy causes the native tool-call lines to lack direct feedback about the actual runtime state.
dsh-subagent-model-visibility is a small DSH plugin that directly displays the actual provider and model used by subagents in the existing native subagent tool-call lines, helping developers observe the real routing behavior.
Plugin Overview¶
- Plugin name:
dsh-subagent-model-visibility - Maintainer: AGSQ11
- Category: Model inference
- License: MIT
- Core value: Instead of guessing the configured model, it observes the
llm/streamrouting of sub-sessions and displays the model actually receiving the requests in the UI.
Installation and Activation¶
Before installation, ensure the plugin files have been extracted to a local directory. Run the following commands to install and start:
dsh plugin --profile web add .\dsh-subagent-model-visibility
dsh web
Usage¶
After installation, the plugin automatically enhances the native subagent dropdown menu and tool-call lines.
- In the native subagent dropdown menu:
Below DSH’s own title/summary, each visible subagent line displays an additional line of information identifying the actual model currently serving that sub-session. For example:
Implement ATR position sizing & risk limits
…existing DSH summary…
Slave: claude-opus-5
- In the native subagent tool-call lines:
The plugin directly adds model information to the existing tool-call lines. For example:
Tool call · subagent · Implement ATR position sizing & risk limits
MODEL brainz / claude-opus-4.7 · 2 model requests · subagent: spawn
OUT
started subagent 616c26ce-...
- View routing history:
If a subagent changes its routing during recovery, the inline display is updated. Hover the mouse over the model line to view the routing history and request count.
How It Works¶
The plugin collects and displays data through the following steps:
- Uses Node
AsyncLocalStorageto wraptools/execute, ensuring that native DSH tool calls can be safely associated with their createdsubagent/startevents, even under concurrent calls. - In the
subagent/startphase, records the sub-session ID and the DSH subagent transport method (such as spawn, fork, ACP, etc.). - Listens to
llm/stream, observes the actual subagent requests bysessionId, and records the provider and model ultimately dispatched to the LLM runtime. - In the
subagent/endphase, records the terminal state. - The web client uses DSH’s stable
[data-chat-call-id]line identity to inject a compact model information line into existing lines and updates it in real time when routing changes.
Configuration¶
The plugin provides basic configuration items to control data retention and UI refresh:
- id: subagent-model-visibility
name: dsh-subagent-model-visibility
config:
retentionMs: 86400000
maxEntries: 1000
uiRefreshMs: 1000
retentionMs: Duration for which completed observation data is retained for UI use.maxEntries: In-memory limit for observed subagent sessions.uiRefreshMs: Frequency with which the browser refreshes for model/failover changes.
Notes¶
- No guessing, only observation: The plugin does not guess the model based on configuration; it directly observes the
llm/streamrouting of sub-sessions. - No behavior modification: The plugin does not modify prompts, model routing logic, tool parameters, tool results, or the subagent lifecycle.
- Initial state: A newly started background subagent briefly displays “Resolving actual model…” before its first model request starts.
- Remote transport limitation: Remote subagent transports that do not issue model requests through the parent DSH
ctx.llmremain in the “Resolving actual model…” state, because authoritative underlying model information cannot be obtained. - Historical line reconstruction: Historical lines created before this plugin started cannot be reliably reconstructed, so they remain unchanged.
- Privacy security: Browser APIs include only tool/subagent IDs, transport names, provider/model routing names, timestamps, request counts, and terminal state. They do not include prompts, model outputs, credentials, headers, file system paths, or tool parameters.
Conclusion¶
dsh-subagent-model-visibility focuses on providing visualization of the actual model calls made by subagents. It helps developers confirm the actual flow of model routing in a non-intrusive way without interfering with core business logic.
- Plugin directory: https://www.skillhub.cn/plugins/AGSQ11/dsh-subagent-model-visibility
- GitHub repository: https://github.com/AGSQ11/dsh-subagent-model-visibility