You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
0.9.1
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
I encountered two issues while using the Dify platform with an agent powered by Claude 3.5 (Sonnet 20240620).
To reproduce this issue, I created an agent using Claude 3.5 (Sonnet 20240620) on the Dify platform. I initiated a conversation with the agent by sending a text message and continued exchanging messages. The conversation proceeded normally for the first 14 messages. In normal operation, the message field contains structured content, such as:
However, on the 14th message, the system stopped responding, and the following error was returned with an empty message field:
[anthropic] Error: peer closed connection without sending complete message body (incomplete chunked read)
message: ""
status: "error"
Attempting to continue the conversation by sending another message resulted in a second error instead of recovery:
[anthropic] Bad Request Error, Error code: 400 - {'type': 'error', 'error': {'type': 'invalid_request_error', 'message': 'messages.29: all messages must have non-empty content except for the optional final assistant message'}}
✔️ Expected Behavior
The agent should respond consistently without interruptions or errors.
❌ Actual Behavior
error occurred:
[anthropic] Error: peer closed connection without sending complete message body (incomplete chunked read)
[anthropic] Bad Request Error, Error code: 400 - {'type': 'error', 'error': {'type': 'invalid_request_error', 'message': 'messages.29: all messages must have non-empty content except for the optional final assistant message'}}
The text was updated successfully, but these errors were encountered:
I found a similar open issue titled "[azure_openai] Error: peer closed connection without sending complete message body (incomplete chunked read)" which might be related to the problem you're experiencing [1]. However, there is no solution found in the comments of that issue.
Additionally, there is a related discussion titled "Bug of Use Claude" that might provide some insights, but it remains unsolved [2].
Regarding the "peer closed connection" error, there isn't specific information available in the repository about the known causes or how the Dify platform handles message chunking that could lead to an incomplete chunked read. Similarly, for the "invalid_request_error," there are no specific requirements for message content documented in the repository.
For the Bad Request Error with code 400, the Dify platform has several error handling mechanisms in place, such as CompletionRequestError and ProviderNotInitializeError, which provide specific feedback and guidance on resolving issues [3][4][5]. However, these do not directly address the "invalid_request_error" you encountered.
You might want to check if there are any updates or patches available for the Dify platform that address these issues, or consider reaching out to the maintainers for further assistance.
Self Checks
Dify version
0.9.1
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
I encountered two issues while using the Dify platform with an agent powered by Claude 3.5 (Sonnet 20240620).
To reproduce this issue, I created an agent using Claude 3.5 (Sonnet 20240620) on the Dify platform. I initiated a conversation with the agent by sending a text message and continued exchanging messages. The conversation proceeded normally for the first 14 messages. In normal operation, the message field contains structured content, such as:
However, on the 14th message, the system stopped responding, and the following error was returned with an empty message field:
Attempting to continue the conversation by sending another message resulted in a second error instead of recovery:
✔️ Expected Behavior
The agent should respond consistently without interruptions or errors.
❌ Actual Behavior
error occurred:
[anthropic] Error: peer closed connection without sending complete message body (incomplete chunked read)
[anthropic] Bad Request Error, Error code: 400 - {'type': 'error', 'error': {'type': 'invalid_request_error', 'message': 'messages.29: all messages must have non-empty content except for the optional final assistant message'}}
The text was updated successfully, but these errors were encountered: