dsh-subagent-model-visibility
A small DeepSeek Harness plugin that shows the actual provider/model used by a subagent directly inside the existing native subagent tool-call row.
It does not guess from the configured model. The host observes the child's real llm/stream GenerateOptions, so the displayed route reflects the model that actually received the request after DSH routing/retry/failover logic.
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-...
If a subagent changes routes during recovery:
MODEL brainz / qwen3-coder 3 routes · 4 model requests
Hover the model line to see the route history and request counts.
How it works
tools/executeis wrapped with NodeAsyncLocalStorageto associate one native DSH tool call with thesubagent/startevent it creates, safely even with concurrent tool calls.subagent/startrecords the child session id and the DSH subagent transport (spawn,fork, ACP, etc.).llm/streamobserves actual child requests bysessionIdand records the final provider/model dispatched to the LLM runtime.subagent/endrecords the terminal state.- The Web client uses DSH's stable
[data-chat-call-id]row identity and adds a compact model line inside the existing row. It updates live when the route changes.
The plugin does not modify prompts, model routing, tool arguments, tool results, or the subagent lifecycle.
Install
From the folder containing the extracted plugin:
dsh plugin --profile web add .\dsh-subagent-model-visibility
dsh web
Or install the packaged .tgz.
Configuration
- id: subagent-model-visibility
name: dsh-subagent-model-visibility
config:
retentionMs: 86400000
maxEntries: 1000
uiRefreshMs: 1000
retentionMs: how long finished observations remain available to the UI.maxEntries: memory bound for observed subagent sessions.uiRefreshMs: browser refresh cadence for model/failover changes.
Accuracy semantics
- Actual model means a provider/model pair observed on a real
ctx.llm.stream()call whosesessionIdis the subagent child. - A newly started background child may briefly display Resolving actual model… before its first model request begins.
- If Phoenix or another router changes model, the badge changes to the latest route and exposes the route count/history.
- Remote subagent transports that do not issue their model request through the parent DSH
ctx.llmcannot expose an authoritative underlying model; those remain at Resolving actual model… rather than inventing a value. - Historical rows created before this plugin started cannot be reconstructed reliably and are intentionally left untouched.
Privacy
The browser API contains only tool/child ids, transport name, provider/model route names, timestamps, request counts and terminal status. Prompts, model output, credentials, headers, filesystem paths and tool arguments are never included.
License
MIT
No comments yet. Be the first to write one.