dsh-finish-reason-patch: Streaming for OpenAI-Compatible Providers Without a Terminal finish_reason
2026-09-27
DeepSeek Harness plugin
DeepSeek Harness plugin
dsh-finish-reason-patch
OpenAI compatible
Flow response
Agent
This plugin aims to solve the problem of DSH aborting with an error while processing agent turns when an OpenAI-compatible gateway fails to return `finish_reason`. It hooks into the streaming response flow and rewrites specific error completion states as normal stop states, thereby supporting such gateway behavior while retaining other error-handling mechanisms. Installation requires manual configuration of `package.json` and adding dependencies, and the logic can be validated using a self-test script.
Read More