dsh-messages-sanitizer
Auto-repairs the messages array after a tool-dispatch crash (orphaned tool_calls / tool messages), preventing 400 INVALID_REQUEST session lock-ups.
工具调度崩溃后自动修复 messages 数组(孤儿 tool_calls / tool 消息),防止 400 INVALID_REQUEST 会话卡死。
How to install
dsh plugin add github:Leeminjing/dsh-messages-sanitizer About
dsh-messages-sanitizer **🔧 你在 DeepSeek Harness 里创建 / 加载插件,对话崩了吗?本插件专治这个。** > 开发或加载本地插件时,一次工具调度崩溃(Cannot read properties of undefined (reading 'prepare'))就会在会话里留下孤儿 tool_calls,之后**每一轮**都被 400 INVALID_REQUEST 拒绝、重试无效、会话卡死。**本插件自动把 messages 数组修回 合法,让对话继续,不再卡死。** 💥 Before ✅ After (安装本插件后) 插件崩溃 插件崩溃 ↓ ↓ 留下孤儿 tool_calls messages 自动修复 ↓ ↓ 400 INVALID_REQUEST 死循环 对话继续 ↓ 对话卡死 DeepSeek Harness 消息数组自动矫正插件:**防止一切因 messages 数组不合法导致的聊天崩溃**。 背景:你遇到的那个崩溃 OpenAI 兼容协议要求工具调用成对出现,且 tool 消息必须**紧邻**其 assistant tool_calls 消息(中间不能插入任何 user / assistant 消息): assistant { content: ..., tool_calls: [{ id: "call_A", ... …
Recommendation signals
Meta
- License
- MIT
- Language
- JavaScript
- GitHub stars
- 1
- mo. downloads
- –
- Last push
- 2026-08-15
- Created
- 2026-08-15
Links
Basic safety check
- Findings
- curated 收录但无 npm 包/安装命令
- Sources
- curated:awesome-dsh-plugin.com, curated:awesome-dsh-plugin/awesome-dsh-plugin
- Topics
- ai-agent, coding-agent, deepseek, deepseek-harness, deepseek-harness-plugin, dsh-plugin, message-repair, openai-compatible, tool-calling
Related plugins
dsh-message-edit
Moeblack/dsh-message-edit
Branch-based message editing, reroll, retry, and a version timeline.
dsh-message-edit
dsh-external/dsh-message-edit
DSH 插件:分支式消息编辑、重掷、重试与版本时间线 | DSH plugin: branch-based message editing, reroll, retry, version timeline
task-passport
dongsheng123132/task-passport
Carry durable task state across DeepSeek Harness, WorkBuddy, Claude Code and Codex with machine-readable checkpoints and optimistic locking.
dsh-side-chat
heartmove/dsh-side-chat
Select part of a conversation and ask about it in a right-side side chat; bring AI replies back to the main chat directly or as a summary.