mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
Error occurs when adding model for OpenAI-API-compatible plugin #88
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @WorthStudy on GitHub (Mar 18, 2025).
Self Checks
Dify version
1.1.0
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
Error occurred when adding models in OpenAI-API-compatible plugins, causing models to fail to be added. Sometimes the error is "Credentials validation failed with status code 401" or "Credentials validation failed with status code 503." Multiple OpenAI-API compatible model providers have been tested, but the above errors have been consistently reported, resulting in the inability to add models.
✔️ Expected Behavior
The normal situation should be that the model is added successfully, and there are no errors reported in the docker container.
❌ Actual Behavior
Actually, it reported the error "Credentials validation failed with status code xxx."
@dosubot[bot] commented on GitHub (Mar 18, 2025):
I found two similar unsolved discussions that might be relevant to your issue:
Error when adding ollama model - This discussion was last updated on March 16, 2025, and it involves errors when adding models, similar to what you're experiencing [1].
Help - Can't add OpenAi compatible Endpoints anymore (0.12.1) - This discussion was last updated on November 28, 2024, and it also deals with issues related to adding OpenAI-compatible endpoints [2].
Regarding the errors you're encountering, the "Credentials validation failed with status code 401" error can occur due to several reasons, such as Dify not being initialized, init validation not being completed, or incorrect credentials. The "Credentials validation failed with status code 503" error is typically due to service instability with specific providers like siliconflow and deepseek. As a workaround, you can try using alternative providers like Gemini or OpenRoute, which have been confirmed to work properly [3][4].
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other
@kevin-lucifer commented on GitHub (May 20, 2025):
Same error here, in my case, openAI compatible url is fine(I give it a aliyun bailian deepseek url),
But the deepseek compatible url not working. The service is stable, such as aliyun bailian platform.
Which means, I can't use third-party deepseek llm, cause I don't have a module ID option.
Aliyun url: https://dashscope.aliyuncs.com/compatible-mode/v1
Error from the front-end:
An error occurred during credentials validation: HTTPSConnectionPool(host='dashscope.aliyuncs.com', port=443): Max retries exceeded with url: /compatible-mode/v1/chat/completions (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1000)')))
@WorthStudy commented on GitHub (May 20, 2025):
The OPENAI-compatible interface of Alibaba Cloud's Bailian does not support DeepSeek. For details, please visit the link: https://bailian.console.aliyun.com/?tab=api#/api/?type=model&url=https%3A%2F%2Fhelp.aliyun.com%2Fdocument_detail%2F2833609.html&renderType=iframe
@kevin-lucifer commented on GitHub (May 20, 2025):
Both deepseek and OpenAI share the same base url, different modelId. (OpenAI SDK). I guess deepseek got it's own sdk too, but OpenAI SDK is more flexible for third-party llm cloud service vender. In my case, it's the only option.
https://bailian.console.aliyun.com/?tab=api#/api/?type=model&url=https%3A%2F%2Fhelp.aliyun.com%2Fdocument_detail%2F2833609.html&renderType=iframe
@dosubot[bot] commented on GitHub (Aug 20, 2025):
Hi, @WorthStudy. I'm Dosu, and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale.
Issue Summary:
Next Steps:
Thanks for your understanding and contribution!