[Tongyi] Tool calls missing in non-streaming response #956

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

Originally created by @Nov1c444 on GitHub (Jan 28, 2026).

Originally assigned to: @Nov1c444 on GitHub.

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.4

Plugin version

0.1.21

Cloud or Self Hosted

Self Hosted (Source)

Description

In non-streaming mode, AssistantPromptMessage does not include tool_calls from the API response, causing tool call information to be lost.

✔️ Error log

No response

Originally created by @Nov1c444 on GitHub (Jan 28, 2026). Originally assigned to: @Nov1c444 on GitHub. ### 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.4 ### Plugin version 0.1.21 ### Cloud or Self Hosted Self Hosted (Source) ### Description In non-streaming mode, AssistantPromptMessage does not include tool_calls from the API response, causing tool call information to be lost. ### ✔️ Error log _No response_
yindo added the bug label 2026-02-16 10:21:07 -05:00
yindo closed this issue 2026-02-16 10:21:07 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jan 28, 2026):

This is a confirmed bug in Dify 1.11.4: in non-streaming mode, AssistantPromptMessage can omit tool_calls, causing tool call info to be lost. The root cause was incorrect initialization and logic in the backend, so the UI never receives tool_calls in non-streaming responses. This has been fixed in Dify after PR #30083 (merged January 2026), which ensures AssistantPromptMessage is properly initialized with both content and tool_calls if present.

To resolve the issue, upgrade to a Dify version that includes this PR. For Tongyi/Qwen models and agent workflows, related plugin improvements are in dify-official-plugins PRs #2298 and #2307, which improve extraction of reasoning content and tool_calls.

If you can't upgrade right away, possible workarounds include patching output handling logic to append new content instead of using string replace, ensuring JSON arguments are well-formed, and avoiding parallel tool calls unless your plugin version is updated to a fixed release. The web UI depends on the backend to persist tool_calls in non-streaming mode, so backend fixes are essential for correct display.

Let me know if you need more details on patching or upgrade steps.

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 (Jan 28, 2026): <!-- Answer --> This is a confirmed bug in Dify 1.11.4: in non-streaming mode, `AssistantPromptMessage` can omit `tool_calls`, causing tool call info to be lost. The root cause was incorrect initialization and logic in the backend, so the UI never receives tool_calls in non-streaming responses. This has been fixed in Dify after [PR #30083](https://github.com/langgenius/dify/pull/30083) (merged January 2026), which ensures `AssistantPromptMessage` is properly initialized with both content and tool_calls if present. To resolve the issue, upgrade to a Dify version that includes this PR. For Tongyi/Qwen models and agent workflows, related plugin improvements are in [dify-official-plugins PRs #2298 and #2307](https://github.com/langgenius/dify-official-plugins/pull/2298), which improve extraction of reasoning content and tool_calls. If you can't upgrade right away, possible workarounds include patching output handling logic to append new content instead of using string replace, ensuring JSON arguments are well-formed, and avoiding parallel tool calls unless your plugin version is updated to a fixed release. The web UI depends on the backend to persist tool_calls in non-streaming mode, so backend fixes are essential for correct display. Let me know if you need more details on patching or upgrade steps. <!-- 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/4e6ce502-b637-4fcf-b8cc-d0c797b13f64?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/4e6ce502-b637-4fcf-b8cc-d0c797b13f64?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/4e6ce502-b637-4fcf-b8cc-d0c797b13f64?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/4e6ce502-b637-4fcf-b8cc-d0c797b13f64?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/4e6ce502-b637-4fcf-b8cc-d0c797b13f64?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/4e6ce502-b637-4fcf-b8cc-d0c797b13f64?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/4e6ce502-b637-4fcf-b8cc-d0c797b13f64?feedback_type=other)</sup> [![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20is%20a%20confirmed%20bug%20in%20Dify%201.11.4%3A%20in%20non-streaming%20mode%2C%20%60AssistantPromptMessage%60%20can%20omit%20%60tool_calls%60%2C%20causing%20tool%20call%20info%20to%20be%20lost.%20The%20root%20cause%20was%20incorrect%20initialization%20and%20logic%20in%20the%20backend%2C%20so%20the%20UI%20never%20receives%20tool_calls%20in%20non-streaming%20responses.%20This%20has%20been%20fixed%20in%20Dify%20after%20%5BPR%20%2330083%5D%28https%3A//github.com/langgenius/dify/pull/30083%29%20%28merged%20January%202026%29%2C%20which%20ensures%20%60AssistantPromptMessage%60%20is%20properly%20initialized%20with%20both%20content%20and%20tool_calls%20if%20present.%0A%0ATo%20resolve%20the%20issue%2C%20upgrade%20to%20a%20Dify%20version%20that%20includes%20this%20PR.%20For%20Tongyi/Qwen%20models%20and%20agent%20workflows%2C%20related%20plugin%20improvements%20are%20in%20%5Bdify-official-plugins%20PRs%20%232298%20and%20%232307%5D%28https%3A//github.com/langgenius/dify-official-plugins/pull/2298%29%2C%20which%20improve%20extraction%20of%20reasoning%20content%20and%20tool_calls.%0A%0AIf%20you%20can%27t%20upgrade%20right%20away%2C%20possible%20workarounds%20include%20patching%20output%20handling%20logic%20to%20append%20new%20content%20instead%20of%20using%20string%20replace%2C%20ensuring%20JSON%20arguments%20are%20well-formed%2C%20and%20avoiding%20parallel%20tool%20calls%20unless%20your%20plugin%20version%20is%20updated%20to%20a%20fixed%20release.%20The%20web%20UI%20depends%20on%20the%20backend%20to%20persist%20tool_calls%20in%20non-streaming%20mode%2C%20so%20backend%20fixes%20are%20essential%20for%20correct%20display.%0A%0ALet%20me%20know%20if%20you%20need%20more%20details%20on%20patching%20or%20upgrade%20steps.)&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/2512)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#956