When adding Deepseek as a model provider, it throws an error: "Credentials validation failed: JSON decode error" #8438

Closed
opened 2026-02-21 18:25:41 -05:00 by yindo · 5 comments
Owner

Originally created by @luckymeet on GitHub (Feb 19, 2025).

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

v0.15.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

When adding Deepseek as a model provider, it throws an error: "Credentials validation failed: JSON decode error"

Image

Image

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @luckymeet on GitHub (Feb 19, 2025). ### 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 v0.15.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce When adding Deepseek as a model provider, it throws an error: "Credentials validation failed: JSON decode error" ![Image](https://github.com/user-attachments/assets/2aad06c6-8865-44cc-a44e-bba9f46a4dfb) ![Image](https://github.com/user-attachments/assets/d1d050ed-bd50-4158-9e6c-d01c95b254e4) ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug🤔 cant-reproduce labels 2026-02-21 18:25:41 -05:00
yindo closed this issue 2026-02-21 18:25:42 -05:00
Author
Owner

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

Hey there, @luckymeet! I'm here to help you with bug reports, questions, and becoming a contributor. Let's tackle this issue together!

I found a similar closed issue that might be relevant to your problem. The issue suggested checking the following:

  1. Check Credentials Format: Ensure that the credentials dictionary is correctly formatted and contains all necessary fields. For DeepSeek, the required field is api_key, and there is an optional endpoint_url field for a custom API endpoint URL.

  2. Verify Credentials: Make sure the api_key is up-to-date and has the necessary permissions for accessing the DeepSeek service.

  3. Default Endpoint URL: If you are using a custom endpoint_url, verify that it is correct. The default value is "https://api.deepseek.com".

If the credentials are correct and the error persists, you may need to check with the service provider to ensure there are no issues with the account or service status [1].

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

@dosubot[bot] commented on GitHub (Feb 19, 2025): <!-- Greeting --> Hey there, @luckymeet! I'm here to help you with bug reports, questions, and becoming a contributor. Let's tackle this issue together! <!-- Answer --> I found a similar closed issue that might be relevant to your problem. The issue suggested checking the following: 1. **Check Credentials Format**: Ensure that the credentials dictionary is correctly formatted and contains all necessary fields. For DeepSeek, the required field is `api_key`, and there is an optional `endpoint_url` field for a custom API endpoint URL. 2. **Verify Credentials**: Make sure the `api_key` is up-to-date and has the necessary permissions for accessing the DeepSeek service. 3. **Default Endpoint URL**: If you are using a custom `endpoint_url`, verify that it is correct. The default value is `"https://api.deepseek.com"`. If the credentials are correct and the error persists, you may need to check with the service provider to ensure there are no issues with the account or service status <sup>[[1]](https://github.com/langgenius/dify/issues/13535)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/85238ed1-3ead-4d7b-b9b9-ea94484e6581?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/85238ed1-3ead-4d7b-b9b9-ea94484e6581?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/85238ed1-3ead-4d7b-b9b9-ea94484e6581?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/85238ed1-3ead-4d7b-b9b9-ea94484e6581?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/85238ed1-3ead-4d7b-b9b9-ea94484e6581?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/85238ed1-3ead-4d7b-b9b9-ea94484e6581?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/85238ed1-3ead-4d7b-b9b9-ea94484e6581?feedback_type=other)</sup>
Author
Owner

@tonyho commented on GitHub (Feb 20, 2025):

I meet this error too when using the volcengine(火山引擎) deepseek R1.

@tonyho commented on GitHub (Feb 20, 2025): I meet this error too when using the volcengine(火山引擎) deepseek R1.
Author
Owner

@Joey-xx commented on GitHub (Feb 21, 2025):

I meet this error too when using the volcengine(火山引擎) deepseek R1.

update to 0.15.3 and set the stream delimiter as '\r\n\r\n' if you use OpenAI-API-compatible

@Joey-xx commented on GitHub (Feb 21, 2025): > I meet this error too when using the volcengine(火山引擎) deepseek R1. update to 0.15.3 and set the stream delimiter as '\r\n\r\n' if you use OpenAI-API-compatible
Author
Owner

@teneous commented on GitHub (Mar 4, 2025):

Hey bro, I have the same issue as you, how did you solve this?

@teneous commented on GitHub (Mar 4, 2025): Hey bro, I have the same issue as you, how did you solve this?
Author
Owner

@teneous commented on GitHub (Mar 4, 2025):

Hey bro, I have the same issue as you, how did you solve this?

After upgrading Dify to version: 1.0, I discovered an OpenAI-API-compatible plugin. I configured it with Aliyun DashScope, and everything worked fine.

Image

Image

@teneous commented on GitHub (Mar 4, 2025): > Hey bro, I have the same issue as you, how did you solve this? After upgrading Dify to `version: 1.0`, I discovered an OpenAI-API-compatible plugin. I configured it with Aliyun DashScope, and everything worked fine. ![Image](https://github.com/user-attachments/assets/e61a6316-ae16-4ebc-897f-62165821fbb4) ![Image](https://github.com/user-attachments/assets/1e7e9b0a-836e-4c6a-9917-41fb8512294c)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#8438