Chat API error - `Unable to retrieve billing information`
Self Checks
- [X] This is only for bug report, if you would like to ask a question, please head to Discussions.
- [X] I have searched for existing issues search for existing issues, including closed ones.
- [X] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
- [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
- [X] Please do not modify this template :) and fill in all the required fields.
Dify version
0.15.0
Cloud or Self Hosted
Cloud
Steps to reproduce
We are facing issues with the /chat-messages endpoint. In some cases, we get a 400 error and the body we get back is the following:
{
"code": "invalid_param",
"message": "Run failed: Unable to retrieve billing information. Please try again later or contact support.",
"status": 400
}
This is the request body we are sending:
{
"query": "hello",
"inputs": {....},
"response_mode": "blocking",
"user": "xxx",
"conversation_id": "yyy"
}
The behavior we observe is inconsistent and seems to occur randomly. Specifically:
- The first request often fails, but subsequent requests tend to succeed.
- This behavior resembles a "cold start" issue, where the initial request triggers an error while subsequent ones function as expected.
Also, when logging in our dashboard, we get the same message with a popup. The network tab verifies the failed request:
✔️ Expected Behavior
Requests to /chat-messages should be successful
❌ Actual Behavior
Requests to /chat-messages are (randomly) failing
Hey @OrWestSide! I'm a bot here to help you with bug fixes, questions, and becoming a contributor. Let's tackle this issue together while we wait for a human maintainer.
The error message "Unable to retrieve billing information" occurs when a GET request is made using the _send_request method, and the response status code is not httpx.codes.OK [1]. This could be related to the initial request failing due to a "cold start" issue, where the first request triggers an error, but subsequent requests succeed.
To address this, you might want to check the following:
- Network Stability: Ensure that there are no network issues that could be causing the initial request to fail.
- Service Dependencies: Verify if there are any dependencies or external services involved in the billing information retrieval process that might be affecting the
/chat-messagesendpoint. - Rate Limiting: Check if there is any rate limiting or throttling mechanism in place that could be contributing to the observed behavior.
If the issue persists, consider logging additional details around the failed requests to identify any patterns or specific conditions that lead to the error.
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other
+1
i have the same problem
+1
We are fixing this.
We're facing the same issue
We have fixed it, however the Actions is down on GitHub, so we haven't released to the production yet.
The fix has been published. @crazywoola