Error in agent node when using DeepSeek V3.2(volcengine_maas) thinking mode #888

Closed
opened 2026-02-16 10:20:51 -05:00 by yindo · 1 comment
Owner

Originally created by @leslie2046 on GitHub (Dec 19, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues Dify issues & Dify Official Plugins, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.11.1

Plugin version

0.0.37

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Add a tool for agent node.eg. current time
Image

✔️ Error log

Run failed: Failed to transform agent message: req_id: 54c9507361 PluginInvokeError: {"args":{},"error_type":"Exception","message":"read llm model failed: request failed: req_id: ce17348edd PluginInvokeError: {"args":{},"error_type":"ArkBadRequestError","message":"Error code: 400 - {'error': {'code': 'InvalidParameter', 'message': \"ThinkingMode: thinking, invalid message without reasoning_content/tool_calls {'tool_calls': [], 'content': '\\u003cthink\\u003e\\\\\\\\\\\\\\\\n用户询问当前时间。我需要使用current_time工具来获取当前时间。这个工具不需要任何参数。我会调用它。\\\\\\\\\\\\\\\\n\\u003c/think\\u003e', 'role': 'assistant'} after last user message Request id: 0217661505518124fe949375ac26682761f342713cef3321c4e2b\", 'param': '', 'type': 'BadRequest'}}, request_id: 20251219212231of1zHtgdX4Y4pHdDlOPl"}"}

Originally created by @leslie2046 on GitHub (Dec 19, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [Dify issues](https://github.com/langgenius/dify/issues) & [Dify Official Plugins](https://github.com/langgenius/dify-official-plugins/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.11.1 ### Plugin version 0.0.37 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce Add a tool for agent node.eg. current time <img width="1510" height="819" alt="Image" src="https://github.com/user-attachments/assets/1a3dbe2e-a557-483c-b8b3-c0800231f6b5" /> ### ✔️ Error log Run failed: Failed to transform agent message: req_id: 54c9507361 PluginInvokeError: {"args":{},"error_type":"Exception","message":"read llm model failed: request failed: req_id: ce17348edd PluginInvokeError: {\"args\":{},\"error_type\":\"ArkBadRequestError\",\"message\":\"Error code: 400 - {'error': {'code': 'InvalidParameter', 'message': \\\"ThinkingMode: thinking, invalid message without reasoning_content/tool_calls `{'tool_calls': [], 'content': '\\u003cthink\\u003e\\\\\\\\\\\\\\\\n用户询问当前时间。我需要使用current_time工具来获取当前时间。这个工具不需要任何参数。我会调用它。\\\\\\\\\\\\\\\\n\\u003c/think\\u003e', 'role': 'assistant'}` after last user message Request id: 0217661505518124fe949375ac26682761f342713cef3321c4e2b\\\", 'param': '', 'type': 'BadRequest'}}, request_id: 20251219212231of1zHtgdX4Y4pHdDlOPl\"}"}
yindo added the bug label 2026-02-16 10:20:51 -05:00
yindo closed this issue 2026-02-16 10:20:51 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 19, 2025):

This is a known issue with DeepSeek V3.2 in thinking mode: the plugin sometimes fails to include the required reasoning_content and tool_calls fields in the agent message, which triggers the PluginInvokeError you’re seeing. The root cause is usually a bug in the plugin’s streamed output handling—specifically, using string replace instead of appending new content can cause missing or incomplete fields in the response.

If you’re self-hosted, a common workaround is to patch the plugin so that streamed output appends new content directly (e.g., full_text += resp_content[len(full_text):]) instead of using string replace. This prevents character loss and empty output. Other things to try: increase the max_tokens parameter, reduce prompt size, or split large knowledge base chunks. If direct API calls to DeepSeek V3.2 with thinking mode enabled return both reasoning_content and content, the issue is almost certainly in the plugin’s output handling logic, not the model itself. Keep an eye out for plugin updates, as this area is under active development. If you want help locating the code section to patch, let me know your deployment details and I can point you to it.
See details and workaround

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Dec 19, 2025): <!-- Answer --> This is a known issue with DeepSeek V3.2 in thinking mode: the plugin sometimes fails to include the required reasoning_content and tool_calls fields in the agent message, which triggers the PluginInvokeError you’re seeing. The root cause is usually a bug in the plugin’s streamed output handling—specifically, using string replace instead of appending new content can cause missing or incomplete fields in the response. If you’re self-hosted, a common workaround is to patch the plugin so that streamed output appends new content directly (e.g., `full_text += resp_content[len(full_text):]`) instead of using string replace. This prevents character loss and empty output. Other things to try: increase the max_tokens parameter, reduce prompt size, or split large knowledge base chunks. If direct API calls to DeepSeek V3.2 with thinking mode enabled return both reasoning_content and content, the issue is almost certainly in the plugin’s output handling logic, not the model itself. Keep an eye out for plugin updates, as this area is under active development. If you want help locating the code section to patch, let me know your deployment details and I can point you to it. [See details and workaround](https://github.com/langgenius/dify-official-plugins/issues/2244) <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/5f4663b5-17de-42fa-a49e-ac161d094ddc?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/5f4663b5-17de-42fa-a49e-ac161d094ddc?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/5f4663b5-17de-42fa-a49e-ac161d094ddc?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/5f4663b5-17de-42fa-a49e-ac161d094ddc?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/5f4663b5-17de-42fa-a49e-ac161d094ddc?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/5f4663b5-17de-42fa-a49e-ac161d094ddc?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/5f4663b5-17de-42fa-a49e-ac161d094ddc?feedback_type=other)</sup> [![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20is%20a%20known%20issue%20with%20DeepSeek%20V3.2%20in%20thinking%20mode%3A%20the%20plugin%20sometimes%20fails%20to%20include%20the%20required%20reasoning_content%20and%20tool_calls%20fields%20in%20the%20agent%20message%2C%20which%20triggers%20the%20PluginInvokeError%20you%E2%80%99re%20seeing.%20The%20root%20cause%20is%20usually%20a%20bug%20in%20the%20plugin%E2%80%99s%20streamed%20output%20handling%E2%80%94specifically%2C%20using%20string%20replace%20instead%20of%20appending%20new%20content%20can%20cause%20missing%20or%20incomplete%20fields%20in%20the%20response.%20%0A%0AIf%20you%E2%80%99re%20self-hosted%2C%20a%20common%20workaround%20is%20to%20patch%20the%20plugin%20so%20that%20streamed%20output%20appends%20new%20content%20directly%20%28e.g.%2C%20%60full_text%20%2B%3D%20resp_content%5Blen%28full_text%29%3A%5D%60%29%20instead%20of%20using%20string%20replace.%20This%20prevents%20character%20loss%20and%20empty%20output.%20Other%20things%20to%20try%3A%20increase%20the%20max_tokens%20parameter%2C%20reduce%20prompt%20size%2C%20or%20split%20large%20knowledge%20base%20chunks.%20If%20direct%20API%20calls%20to%20DeepSeek%20V3.2%20with%20thinking%20mode%20enabled%20return%20both%20reasoning_content%20and%20content%2C%20the%20issue%20is%20almost%20certainly%20in%20the%20plugin%E2%80%99s%20output%20handling%20logic%2C%20not%20the%20model%20itself.%20Keep%20an%20eye%20out%20for%20plugin%20updates%2C%20as%20this%20area%20is%20under%20active%20development.%20If%20you%20want%20help%20locating%20the%20code%20section%20to%20patch%2C%20let%20me%20know%20your%20deployment%20details%20and%20I%20can%20point%20you%20to%20it.%20%20%0A%5BSee%20details%20and%20workaround%5D%28https%3A//github.com/langgenius/dify-official-plugins/issues/2244%29)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify-official-plugins/issues/2297)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#888