/v1/chat-messages は response_mode=blocking のときに text/event-stream を返します (Dify 1.13.0) #22231

Open
opened 2026-02-21 20:16:15 -05:00 by yindo · 0 comments
Owner

Originally created by @kokutoubanira on GitHub (Feb 15, 2026).

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

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

1.	Deploy Dify v1.13.0 (self-hosted). Confirm the response header contains X-Version: 1.13.0.
2.	Call POST /v1/chat-messages with response_mode explicitly set to "blocking".
curl https://<your-host>/v1/chat-messages \-H "認可:ベアラー <APP_KEY>" \-H "Content-Type: application/json" \-d '{"入力": {},"query": "こんにちは","conversation_id": ",""user": "デバッガ","response_mode": "ブロック中"}'

✔️ Expected Behavior

•	When response_mode is "blocking", the endpoint should return a complete JSON response with Content-Type: application/json (blocking mode returns a ChatCompletionResponse object).  

Actual Behavior

•	Even though the request specifies response_mode: "blocking", the response headers are returned as SSE:
•	Content-Type: text/event-stream; charset=utf-8
•	Transfer-Encoding: chunked
•	Clients (Insomnia / curl / libcurl) receive only a very small initial chunk (e.g., ~18 bytes) and then the server closes the connection, resulting in errors such as:
•	transfer closed with outstanding read data remaining
•	Insomnia: Transferred a partial file
•	This behavior contradicts the documented contract that only response_mode: "streaming" should return text/event-stream
Originally created by @kokutoubanira on GitHub (Feb 15, 2026). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [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 [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.13.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 1. Deploy Dify v1.13.0 (self-hosted). Confirm the response header contains X-Version: 1.13.0. 2. Call POST /v1/chat-messages with response_mode explicitly set to "blocking". ``` curl https://<your-host>/v1/chat-messages \-H "認可:ベアラー <APP_KEY>" \-H "Content-Type: application/json" \-d '{"入力": {},"query": "こんにちは","conversation_id": ",""user": "デバッガ","response_mode": "ブロック中"}' ``` ### ✔️ Expected Behavior • When response_mode is "blocking", the endpoint should return a complete JSON response with Content-Type: application/json (blocking mode returns a ChatCompletionResponse object).  ### ❌ Actual Behavior • Even though the request specifies response_mode: "blocking", the response headers are returned as SSE: • Content-Type: text/event-stream; charset=utf-8 • Transfer-Encoding: chunked • Clients (Insomnia / curl / libcurl) receive only a very small initial chunk (e.g., ~18 bytes) and then the server closes the connection, resulting in errors such as: • transfer closed with outstanding read data remaining • Insomnia: Transferred a partial file • This behavior contradicts the documented contract that only response_mode: "streaming" should return text/event-stream
yindo added the 🐞 bug label 2026-02-21 20:16:15 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#22231