michael-han-il/dsh-llm-finish-reason-tolerance
michael-han-il★ 0JavaScriptLast synced: 2026-08-17
A DeepSeek Harness host plugin that makes the agent tolerate OpenAI-compatible providers whose streaming responses end without a finish_reason. The canonical case is the Snowflake Cortex REST API gateway.
README excerpt
dsh-llm-finish-reason-tolerance A DeepSeek Harness host plugin that makes the agent tolerate OpenAI-compatible providers whose streaming responses end without a finish reason . The canonical case is the Snowflake Cortex gateway ( .snowflakecomputing.com/api/v2/cortex/v1 ): its Chat Completions SSE streams content deltas and a terminal data: [DONE] but never sends a finish reason — not for plain text, not for tool calls (non-streaming responses return finish reason: "" ). The harness's model client (pi-ai) treats that as a truncated stream ( Stream ended without finish reason ), and the harness maps it to a TRANSPORT error finish. Every request delivers content and then fails the turn . This plugin rewrites only that specific terminal error into the successful finish the content already deserves. How it works The plugin listens on the harness's llm/stream waterfall (registered globally and prepended, so its returned iterable is the one consumers iterate) and wraps every model stream: - a tool-call block was delivered → the terminal finish becomes { kind: 'tool-calls' } - text content was delivered → the terminal finish becomes { kind: 'stop' } - nothing was delivered, or the error i…
View full README on GitHub →Category
🎨 Best DeepSeek Harness Design Plugin. The open-source Claude Design alternative. 🖥️ Local-first desktop app. 🖼️ Your coding agent becomes the design engine: prototypes, landing pages, dashboards, slides, images & video — real files, HTML/PDF/PPTX/MP4 export. 🤖 Claude Code / Codex / Cursor / DeepSeek Harness / OpenCode & 20+ CLIs via BYOK.
★ 87,829
volcengine/OpenVikingSelf-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.
★ 28,745
titanwings/colleague-skill将冰冷的离别化为温暖的 Skill,欢迎加入数字生命1.0!Transforming cold farewells into warm skills? It's giving rebirth era. Welcome to Digital Life 1.0. 🫶
★ 22,971