Lynn (@lynn6)关于 DeepSeek V4 系列在 OpenCode 中报错400的解决方案 中发帖

今天喜迎 DeepSeek-V4 系列发布,但是在接入 OpenCode 工作流的时候遇到了一些问题,提示 400,如: 

The `content[].thinking` in the thinking mode must be passed back to the API.



messages.X.content.0.type: Expected 'thinking' or 'redacted_thinking', but found 'tool_use'


与群友讨论交流了后,开发了一个插件来解决这个问题。
https://www.npmjs.com/package/opencode-deepseek-thinking-fix
太长不看
"plugin": ["opencode-deepseek-thinking-fix"]