The Function Calling Agent persists in using non-streaming requests despite OpenAI-API-compatible models supporting streaming function calls. #164

Closed
opened 2026-02-16 10:18:18 -05:00 by yindo · 7 comments
Owner

Originally created by @ExenVitor on GitHub (Apr 2, 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

v1.1.3

Plugin version

agent=0.0.12 openai_api_compatible=0.0.11

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Steps to Reproduce:

  1. In the openai_api_compatible plugin, add a model with the "Stream function calling" option enabled
    Image

  2. Configure an agent node using the Function Calling Agent

  3. Observe the stream parameter remains False in all agent requests

Debug Findings:
The fc_params.model.entity persistently returns None, which appears to be the root cause. Could this suggest a potential issue in the openai_api_compatible plugin's implementation?

https://github.com/langgenius/dify-official-plugins/blob/0bcb980f6d3f82901a58f874700423937b185945/agent-strategies/cot_agent/strategies/function_calling.py#L68C7-L73C10
Image

Image

✔️ Error log

No response

Originally created by @ExenVitor on GitHub (Apr 2, 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 v1.1.3 ### Plugin version agent=0.0.12 openai_api_compatible=0.0.11 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce **Steps to Reproduce:** 1. In the `openai_api_compatible` plugin, add a model with the **"Stream function calling"** option enabled ![Image](https://github.com/user-attachments/assets/0e1048e8-8100-48d5-9dd6-c83776ddfe4d) 2. Configure an agent node using the **Function Calling Agent** 3. Observe the `stream` parameter remains `False` in all agent requests **Debug Findings:** The `fc_params.model.entity` persistently returns `None`, which appears to be the root cause. Could this suggest a potential issue in the openai_api_compatible plugin's implementation? [https://github.com/langgenius/dify-official-plugins/blob/0bcb980f6d3f82901a58f874700423937b185945/agent-strategies/cot_agent/strategies/function_calling.py#L68C7-L73C10](https://github.com/langgenius/dify-official-plugins/blob/0bcb980f6d3f82901a58f874700423937b185945/agent-strategies/cot_agent/strategies/function_calling.py#L68C7-L73C10) ![Image](https://github.com/user-attachments/assets/cdde57ae-ac32-4c44-8f3c-6856a4b63d05) ![Image](https://github.com/user-attachments/assets/2dd03c08-9479-48da-86a9-d51e8d9ca162) ### ✔️ Error log _No response_
yindo added the bug label 2026-02-16 10:18:18 -05:00
yindo closed this issue 2026-02-16 10:18:18 -05:00
Author
Owner

@leslie2046 commented on GitHub (Apr 2, 2025):

@ExenVitor How do you host your QwQ-32B-AWQ? ollma or vLLM?

@leslie2046 commented on GitHub (Apr 2, 2025): @ExenVitor How do you host your QwQ-32B-AWQ? ollma or vLLM?
Author
Owner

@ExenVitor commented on GitHub (Apr 2, 2025):

@ExenVitor How do you host your QwQ-32B-AWQ? ollma or vLLM?

sglang with tool-call-parser and reasoning-parser enabled

@ExenVitor commented on GitHub (Apr 2, 2025): > [@ExenVitor](https://github.com/ExenVitor) How do you host your QwQ-32B-AWQ? ollma or vLLM? sglang with tool-call-parser and reasoning-parser enabled
Author
Owner

@leslie2046 commented on GitHub (Apr 2, 2025):

openai_api_compatible.zip
Can you uncompress it and install it ,and test it ?

@leslie2046 commented on GitHub (Apr 2, 2025): [openai_api_compatible.zip](https://github.com/user-attachments/files/19578657/openai_api_compatible.zip) Can you uncompress it and install it ,and test it ?
Author
Owner

@ExenVitor commented on GitHub (Apr 2, 2025):

Image

Image

The new version alse doesn't work.

@ExenVitor commented on GitHub (Apr 2, 2025): ![Image](https://github.com/user-attachments/assets/66e1db96-af21-4846-95f3-37e35d71e8e7) ![Image](https://github.com/user-attachments/assets/d6794ed8-7607-4d48-b434-4fca4ada4af6) The new version alse doesn't work.
Author
Owner

@ExenVitor commented on GitHub (Apr 3, 2025):

There might be something wrong in this code segment
https://github.com/langgenius/dify/blob/12faecdf895f058b15f0cb4536e9df7686f336c4/api/core/workflow/nodes/agent/agent_node.py#L234C1-L245C101

@ExenVitor commented on GitHub (Apr 3, 2025): There might be something wrong in this code segment [https://github.com/langgenius/dify/blob/12faecdf895f058b15f0cb4536e9df7686f336c4/api/core/workflow/nodes/agent/agent_node.py#L234C1-L245C101](https://github.com/langgenius/dify/blob/12faecdf895f058b15f0cb4536e9df7686f336c4/api/core/workflow/nodes/agent/agent_node.py#L234C1-L245C101)
Author
Owner

@dosubot[bot] commented on GitHub (Aug 18, 2025):

Hi, @ExenVitor. I'm Dosu, and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported that the Function Calling Agent in Dify v1.1.3 does not use streaming requests despite model support.
  • The root cause appears to be fc_params.model.entity returning None, which disables the stream parameter.
  • You clarified your hosting setup using sglang with specific parsers enabled.
  • A patched version of the openai_api_compatible plugin was provided but did not resolve the issue.
  • You identified a suspicious code segment in agent_node.py that might be responsible.

Next Steps:

  • Please confirm if this issue is still relevant with the latest version of the dify-official-plugins repository by commenting here.
  • If no response is received within 5 days, I will automatically close the issue.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Aug 18, 2025): Hi, @ExenVitor. I'm [Dosu](https://dosu.dev), and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale. **Issue Summary:** - You reported that the Function Calling Agent in Dify v1.1.3 does not use streaming requests despite model support. - The root cause appears to be `fc_params.model.entity` returning `None`, which disables the `stream` parameter. - You clarified your hosting setup using sglang with specific parsers enabled. - A patched version of the openai_api_compatible plugin was provided but did not resolve the issue. - You identified a suspicious code segment in `agent_node.py` that might be responsible. **Next Steps:** - Please confirm if this issue is still relevant with the latest version of the dify-official-plugins repository by commenting here. - If no response is received within 5 days, I will automatically close the issue. Thank you for your understanding and contribution!
Author
Owner

@martinzh717 commented on GitHub (Dec 9, 2025):

This Agent needs to be optimized. It's currently returning responses in a non-streaming manner, which causes too many issues. It's likely we'll need to plan a transition to Coze Studio later

@martinzh717 commented on GitHub (Dec 9, 2025): This Agent needs to be optimized. It's currently returning responses in a non-streaming manner, which causes too many issues. It's likely we'll need to plan a transition to Coze Studio later
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#164