dsh-llm-finish-reason-tolerance
Run the following command in DeepSeek Harness:
dsh plugin install michael-han-il/dsh-llm-finish-reason-tolerance
Paste the following prompt into your AI chat to install this plugin:
To install this plugin in DeepSeek Harness, run `dsh plugin install michael-han-il/dsh-llm-finish-reason-tolerance` referencing the source code at https://github.com/michael-han-il/dsh-llm-finish-reason-tolerance.
About this plugin
When integrating DeepSeek Harness with certain OpenAI-compatible providers like Snowflake Cortex, developers often encounter a tricky compatibility issue. These services correctly send data: [DONE] during streaming but fail to include the standard finish_reason field in their response. Consequently, the Harness model client misinterprets this as a stream truncation error, terminating the entire conversational turn despite the actual content being fully received.
The dsh-llm-finish-reason-tolerance plugin is designed specifically to resolve this pain point. Acting as a global listener within Harness, it precisely intercepts and rewrites the specific stream termination error. By intelligently determining the type of content delivered, it transforms the original "transport failure" into a legitimate "successful finish" state, ensuring the Agent can naturally conclude its current turn without interruption caused by a missing metadata field.
This plugin is ideal for developers building on DeepSeek Harness who need to support providers like Snowflake Cortex or similar implementations. It requires no modification of underlying code and works seamlessly upon installation and restart, significantly enhancing Harness's compatibility and robustness towards non-standard OpenAI API behaviors.
Use Cases
- Integrating Snowflake Cortex model gateway
- Resolving missing finish_reason in streaming responses
- Ensuring DeepSeek Harness compatibility with non-standard APIs
Best For
- AI developers using DeepSeek Harness
- Architects integrating complex LLM gateways
- DevOps engineers handling non-standard API responses
Related Plugins
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.
An armor-breaking plugin for DeepSeek: rewrites instruction priority, expands refusal-blocked phrases, persists across sessions, and shows a green active indicator.