dsh-model-fix
Run the following command in DeepSeek Harness:
dsh plugin install Retr67/dsh-model-fix
Paste the following prompt into your AI chat to install this plugin:
Install this plugin in DeepSeek Harness by running dsh plugin install Retr67/dsh-model-fix; the source code is available at https://github.com/Retr67/dsh-model-fix.
About this plugin
The opencode aggregate endpoints for muse-spark-1.2 and gpt-5.6-luna have a subtle bug: the stream delivers all content correctly but never sends a finish_reason or the [DONE] sentinel before closing. DSH's pi-ai SDK strictly requires that terminal marker, so every turn collapses into a Stream ended without finish_reason error (mapped to TRANSPORT). Because TRANSPORT is on the default retry list, the agent-level retry loop replays the whole step up to maxRetries times, silently burning extra tokens. Swapping proxies or re-connecting does not help — the defect lives in the model endpoint itself.
dsh-model-fix patches the llm/stream waterfall with a narrowly scoped fix. It intervenes only when a stream has already produced real content (text-delta, reasoning-delta, or tool-call-delta), the closing error is TRANSPORT or STREAM_CLOSED, and the message explicitly says the terminal event is missing. In that case the defective ending is rewritten to a clean stop. Genuine transport failures such as SocketError remain untouched and still surface as errors; empty zero-content responses are not masked either. Two config fields — modelPattern (a regex over model IDs) and providers (an optional routing-key whitelist) — let you limit the patch to exactly the models and routes you need.
If you route muse-spark or gpt-5.6-luna through opencode-go in DSH and keep hitting content-fine-but-turn-fails errors with wasted retries, this plugin is for you. Install it, restart the target profile, and the spurious TRANSPORT errors disappear. No data-training opt-in is required and no proxy is needed.
Use Cases
- Hitting repeated Stream ended without finish_reason errors when calling muse-spark or gpt-5.6-luna in DSH
- Content renders fine but the turn fails, triggering TRANSPORT retry loops that waste tokens
- Needing to use specific models via the opencode-go route without opting into data-training permissions
Best For
- Developers calling muse-spark or gpt-5.6-luna through opencode-go in DSH
- DeepSeek Harness users hitting repeated agent-level retry loops caused by spurious TRANSPORT errors
- Stacks that want to fix stream-termination defects without proxies or upstream endpoint changes
Related Plugins
A unified suite combining hot runtime injection, task-aware thinking-mode routing, and a graded session protocol with red-team gates to sustain model diligence across long-horizon inference.
ModLens is a vision plugin for DeepSeek Harness that gives text-only models sight by reading images pasted directly into chat, with zero-config setup and multiple vision engines.
On-demand vision for text-only DeepSeek Harness agents: built-in free keyless vision chain and 14 vision tools, routing image turns as tool calls to vision models with pixel fidelity, no Python needed, one-command install.
Give text-only models in DeepSeek Harness eyes, enabling image Q&A, long-screenshot OCR, UI restoration, and GUI visual tasks.