dsh--API-message_stop-
Run the following command in DeepSeek Harness:
dsh plugin install zzzyaar/dsh--API-message_stop-
Paste the following prompt into your AI chat to install this plugin:
Run dsh plugin install zzzyaar/dsh--API-message_stop- in DeepSeek Harness to install this plugin; the source repository is at https://github.com/zzzyaar/dsh--API-message_stop- . Restart dsh after installation to activate it.
About this plugin
If you run dsh against a third-party Anthropic-compatible gateway, you likely hit this on nearly every turn: the reply text is fully rendered on screen, yet dsh immediately throws Anthropic stream ended before message_stop and the llm-retry module fires up to five exponential-backoff requests (467 to 7282 ms). The root cause is simple - the gateway closes the event stream without emitting a terminal message_stop or done event, so the adapter classifies it as a TRANSPORT error and the retry loop re-issues the entire step. The final output is still correct, but every conversation wastes several seconds on pointless retries and the session log fills up with noise.
The plugin wraps the host public llm/stream waterfall with a thin shim: every content chunk (block headers, text, reasoning, tool calls, usage) passes through untouched. It intervenes only when the error fingerprint matches content already received plus missing terminal signal (code STREAM_CLOSED, or a message containing stream ended before/without message_stop/done), and only when every unclosed tool-call block carries valid JSON parameters - in that case it swallows the error and closes the stream cleanly. Real outages, rate limits, timeouts, auth failures, empty responses, and malformed tool calls all pass through unchanged; retry semantics are untouched. The plugin touches no credentials, makes no network requests, and adds zero new attack surface.
Built for anyone running agent workflows in dsh with a third-party Anthropic-compatible gateway (relay stations, proxy gateways). Official API endpoints are unaffected unless you explicitly list them in the rules. Manage scope per provider and model via the GUI settings page (process-level) or a preset config line (session-level); changes take effect on the very next request.
Use Cases
- Third-party gateway omits terminal event causing repeated backoff retries
- Complete reply arrives but triggers a TRANSPORT error
- Reduce pointless exponential backoff latency on every turn
Best For
- dsh users running third-party Anthropic-compatible gateways
- Agent workflows hitting stream ended before message_stop errors
- Developers needing fine-grained retry control
Related Plugins
A method pack that makes AI coding agents plan against your real baseline, prove completion with fresh evidence, and reduce reworks and unsafe changes.
Turns the DeepSeek Harness session into a captain that builds a durable sub-agent team, splits goals into dependency-aware tasks, and coordinates work via direct messages and a live Web UI.
Gives coding agents design judgment, letting Claude Code, Cursor, and 70+ agents generate and iterate high-quality UI, presentations, and graphics right from the terminal.
Run the Pi ecosystem's plugins on DeepSeek Harness, unmodified, via a compatibility layer that implements Pi's public extension ABI on DSH's native services.