DeepSeek Load Balancing Bug #6967

Closed
opened 2026-02-21 18:18:10 -05:00 by yindo · 8 comments
Owner

Originally created by @walden668 on GitHub (Nov 26, 2024).

Originally assigned to: @crazywoola on GitHub.

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 search for existing issues, 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

0.12.1

Cloud or Self Hosted

Cloud

Steps to reproduce

2024-11-26_6 52 02
2024-11-26_6 53 44

Reporting a bug: DeepSeek load balancer triggers an error approximately every two attempts.
I've verified that all keys are working fine - direct API calls to the official endpoint using curl work normally.

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @walden668 on GitHub (Nov 26, 2024). Originally assigned to: @crazywoola on GitHub. ### 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 [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 (我已阅读并同意 [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 0.12.1 ### Cloud or Self Hosted Cloud ### Steps to reproduce ![2024-11-26_6 52 02](https://github.com/user-attachments/assets/9385e0f8-d038-4565-ba8a-1b02c255aa39) ![2024-11-26_6 53 44](https://github.com/user-attachments/assets/5e1eeca2-76ea-4383-9f4a-2e782fd02a04) Reporting a bug: DeepSeek load balancer triggers an error approximately every two attempts. I've verified that all keys are working fine - direct API calls to the official endpoint using curl work normally. ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🐞 buggood first issuestalecloud labels 2026-02-21 18:18:10 -05:00
yindo closed this issue 2026-02-21 18:18:10 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Nov 26, 2024):

@walden668 Hello there! I'm here to help you with bug reports, answer your questions, and assist you in becoming a contributor. Let's tackle this issue together while we wait for a human maintainer.

The issue you're experiencing with the DeepSeek load balancer might be related to its request distribution mechanism. The load balancer uses a Round-robin strategy, which can lead to intermittent failures if rate limits are triggered. When these limits are exceeded, a 1-minute cooldown period is applied, potentially causing temporary unavailability and resulting in errors approximately every two attempts [1].

To address this, you might want to check if the rate limits are being exceeded and adjust your request patterns accordingly. If the issue persists, further investigation into the specific error messages or logs generated by the load balancer could provide more insights.

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Nov 26, 2024): <!-- Greeting --> @walden668 Hello there! I'm here to help you with bug reports, answer your questions, and assist you in becoming a contributor. Let's tackle this issue together while we wait for a human maintainer. <!-- Answer --> The issue you're experiencing with the DeepSeek load balancer might be related to its request distribution mechanism. The load balancer uses a Round-robin strategy, which can lead to intermittent failures if rate limits are triggered. When these limits are exceeded, a 1-minute cooldown period is applied, potentially causing temporary unavailability and resulting in errors approximately every two attempts <sup>[[1]](https://github.com/langgenius/dify-docs/blob/main/zh_CN/guides/model-configuration/load-balancing.md)</sup>. To address this, you might want to check if the rate limits are being exceeded and adjust your request patterns accordingly. If the issue persists, further investigation into the specific error messages or logs generated by the load balancer could provide more insights. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@walden668 commented on GitHub (Nov 26, 2024):

I've confirmed that no rate limit was triggered, since the returned error is a 401 auth error

@walden668 commented on GitHub (Nov 26, 2024): I've confirmed that no rate limit was triggered, since the returned error is a 401 auth error
Author
Owner

@crazywoola commented on GitHub (Nov 26, 2024):

Can you paste the text errors as well?

@crazywoola commented on GitHub (Nov 26, 2024): Can you paste the text errors as well?
Author
Owner

@walden668 commented on GitHub (Nov 27, 2024):

Can you paste the text errors as well?

Run failed: [deepseek] Error: API request failed with status code 401: {"error":{"message":"Authentication Fails (no such user)","type":"authentication_error","param":null,"code":"invalid_request_error"}}

@walden668 commented on GitHub (Nov 27, 2024): > Can you paste the text errors as well? Run failed: [deepseek] Error: API request failed with status code 401: {"error":{"message":"Authentication Fails (no such user)","type":"authentication_error","param":null,"code":"invalid_request_error"}}
Author
Owner

@MichaelLynn1996 commented on GitHub (Nov 28, 2024):

I encountered a similar issue with versions 0.11.x and 0.12.x, where every request to glm and moonshot in chatbox returns a 401 error, yet it works fine with the openai library in python. I didn't have this problem with version 0.8.x. https://github.com/langgenius/dify/issues/9877 I think these are the same issue.

@MichaelLynn1996 commented on GitHub (Nov 28, 2024): I encountered a similar issue with versions 0.11.x and 0.12.x, where every request to glm and moonshot in chatbox returns a 401 error, yet it works fine with the openai library in python. I didn't have this problem with version 0.8.x. https://github.com/langgenius/dify/issues/9877 I think these are the same issue.
Author
Owner

@walden668 commented on GitHub (Dec 4, 2024):

Can you paste the text errors as well?

Will someone fix this issue?

@walden668 commented on GitHub (Dec 4, 2024): > Can you paste the text errors as well? Will someone fix this issue?
Author
Owner

@AmyHei commented on GitHub (Jan 24, 2025):

I got this "Credentials validation failed with status code 402"

@AmyHei commented on GitHub (Jan 24, 2025): I got this "Credentials validation failed with status code 402"
Author
Owner

@dosubot[bot] commented on GitHub (Feb 24, 2025):

Hi, @walden668. I'm Dosu, and I'm helping the Dify team manage their backlog. I'm marking this issue as stale.

Issue Summary:

  • Reported bug in DeepSeek load balancer of Dify version 0.12.1 causing 401 authentication errors.
  • API keys work correctly when tested directly; issue not related to rate limits.
  • Similar issues reported by other users in versions 0.11.x and 0.12.x, with related 402 error reported.

Next Steps:

  • Please confirm if this issue is still relevant to the latest version of Dify.
  • If no further updates are provided, the issue will be automatically closed in 15 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Feb 24, 2025): Hi, @walden668. I'm [Dosu](https://dosu.dev), and I'm helping the Dify team manage their backlog. I'm marking this issue as stale. **Issue Summary:** - Reported bug in DeepSeek load balancer of Dify version 0.12.1 causing 401 authentication errors. - API keys work correctly when tested directly; issue not related to rate limits. - Similar issues reported by other users in versions 0.11.x and 0.12.x, with related 402 error reported. **Next Steps:** - Please confirm if this issue is still relevant to the latest version of Dify. - If no further updates are provided, the issue will be automatically closed in 15 days. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#6967