huyang218/dsh-plugins--packages-gateway-compat ↗★ 0
dsh-plugin-gateway-compat
第三方 OpenAI 风格网关兼容插件:容忍在完整回复后未发送 [DONE] 结束符而直接关闭的 SSE 流。
AI 分析
核心用途是解决部分第三方大模型网关非标准断开导致会话报错的问题。适合使用非官方 API 代理且频繁遇到流传输中断报错的用户。
安裝
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:huyang218/dsh-plugins#efa02c42cd65f80b544659dfd6dbd00b6f293d41&path:packages/gateway-compat說明文件
閱讀完整 README ↗dsh-plugin-gateway-compat
English | 中文
Compatibility shim for third-party OpenAI-style gateways used with DeepSeek Harness.
Some gateways end an SSE stream right after the last content chunk, without the
data: [DONE] sentinel. The adapter correctly reports that as STREAM_CLOSED,
which turns a fully delivered reply into a failed turn. This plugin wraps the
llm/stream waterfall and rewrites that one terminal error into a normal
stop finish.
It does so only when plain content was actually received and no tool call was in flight, so genuine mid-stream disconnects and truncated tool calls still fail loudly and stay eligible for the provider's retry policy.
Install
dsh plugin --profile web add dsh-plugin-gateway-compat
No configuration. The plugin registers no tools and is invisible to the model.
License
MIT