deepseek-protocol-doctor
在终端中运行以下命令:
dsh plugin install Whning0513/deepseek-protocol-doctor
将以下提示词粘贴到 DeepSeek Harness 对话框中:
在 DeepSeek Harness 中运行 dsh plugin install Whning0513/deepseek-protocol-doctor 即可安装该协议检查插件,完整源码见 https://github.com/Whning0513/deepseek-protocol-doctor
插件介绍
接 DeepSeek tool calling 时,工具结果已传回却仍 400、流式参数拼完不是合法 JSON、history 开关 thinking 表现不一致——这些往往不是模型问题,而是请求与响应的协议拼接出了错。deepseek-protocol-doctor 就是针对这类问题的静态检查器。
它把已有的请求 JSON 或 SSE/JSONL 录制文件逐条检测:tool_call_id 缺失或错位、reasoning_content 被客户端丢弃、function.arguments 未拼完即解析、多路 delta 交错追加、strict schema 漏写 required 或 additionalProperties、max_tokens 与 thinking 路由配置等。每条发现带固定 code,输出支持 text、JSON、SARIF,可直接挂进 CI。
适合对接 DeepSeek tool calls、流式推理或自建 agent 管线的开发者。它不跑 benchmark、不评判回答质量,只负责在协议层把伪装成模型抽风的 bug 揪出来。
使用场景
- 请求 JSON 或 SSE 录制文件排查 400 错误与参数拼接异常
- 流式多路 tool call delta 交错导致 function.arguments 损坏
- 团队 CI 中对 DeepSeek 请求做协议层静态门禁校验
适合人员
- 对接 DeepSeek tool calling 的 API 开发者
- 需要排查流式推理协议问题的 Agent 管线工程师
- 在 CI 中统一 DeepSeek 请求规范的的后端团队