#24007generating chat title will block `/v1/chat-messages` streaming response
Issue Details
Self Checks
- I have read the Contributing Guide and Language Policy.
- This is only for bug report, if you would like to ask a question, please head to Discussions.
- I have searched for existing issues search for existing issues, including closed ones.
- I confirm that I am using English to submit this report, otherwise it will be closed.
- 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
- Please do not modify this template :) and fill in all the required fields.
Dify version
1.7.1
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
It's related to my last issue #23311
At first I found the problem was with the model provider plugin I used. When I used huawei cloud maas provider, the issue appeared, but using openai-compatible is fine.
And I found it from plugin daemon logs that for each new conversation, the llm/invoke
is triggered twice. One is normal, another takes much longer time which is almost the same showing on Postman.
Thanks to this issue https://github.com/langgenius/dify-plugin-daemon/issues/329, I set up a proxy on plugin daemon and I finally got what the second invoke is used for.
It used deepseek-r1 to generate chat title which took around 25 seconds to finish. So I can resolve this by using a non-cot model as system llm model, but in general the new conversation should not hang once the workflow is done.
✔️ Expected Behavior
The chat title request should not block the /v1/chat-messages
on streaming mode.
Same test for /api/chat-messages
, no similar issue found.
❌ Actual Behavior
The /v1/chat-messages
streaming cannot close until the chat title request is finished.