fail on adding gitee.ai provider's token, as when haven't buy the model "Qwen2-7B-Instruct" #6531

Closed
opened 2026-02-21 18:16:09 -05:00 by yindo · 2 comments
Owner

Originally created by @fchange on GitHub (Nov 4, 2024).

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.10.2

Cloud or Self Hosted

Cloud

Steps to reproduce

create a totally new acount on gitee.ai, create and copy a new access_token to dify, try to add provider on dify.

✔️ Expected Behavior

add provider done

Actual Behavior

image

Credentials validation failed with status code 400

Originally created by @fchange on GitHub (Nov 4, 2024). ### 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.10.2 ### Cloud or Self Hosted Cloud ### Steps to reproduce create a totally new acount on gitee.ai, create and copy a new access_token to dify, try to add provider on dify. ### ✔️ Expected Behavior add provider done ### ❌ Actual Behavior ![image](https://github.com/user-attachments/assets/e5670e92-bb8f-4ccc-8f06-5985bd19e2e6) Credentials validation failed with status code 400
yindo added the 🐞 bug label 2026-02-21 18:16:09 -05:00
yindo closed this issue 2026-02-21 18:16:10 -05:00
Author
Owner
@crazywoola commented on GitHub (Nov 4, 2024): We use this model for validations. https://github.com/langgenius/dify/blob/0ebd9856725e273621db5c7943a9e18e01991aeb/api/core/model_runtime/model_providers/gitee_ai/gitee_ai.py#L19-L20
Author
Owner

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

Hello, @fchange! I'm a bot here to assist you with bugs, questions, and becoming a contributor. I'll help you while you wait for a human maintainer.

I found a similar issue related to adding a provider's token in Dify, specifically for Gitee.ai. The issue titled "添加智谱模型提示token过期" was closed, but it might provide some insights [1].

The status code 400 in Dify can indicate several issues, such as invalid provider credentials or quota exhaustion [2]. In your case, since you're encountering a credentials validation failure, it might be due to incorrect or incomplete credentials.

To resolve this, ensure that you have correctly entered the API Key for Gitee.ai. The API Key should be obtained from Gitee AI's dashboard and entered in the secret-input field in Dify [3]. Additionally, make sure that the API Key is valid and has the necessary permissions.

If the issue persists, consider checking if there are any specific requirements or limitations for using the Qwen2-7B-Instruct model with Gitee.ai, such as context size or parameter rules [4].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Nov 4, 2024): <!-- Greeting --> Hello, @fchange! I'm a bot here to assist you with bugs, questions, and becoming a contributor. I'll help you while you wait for a human maintainer. <!-- Answer --> I found a similar issue related to adding a provider's token in Dify, specifically for Gitee.ai. The issue titled "添加智谱模型提示token过期" was closed, but it might provide some insights <sup>[[1]](https://github.com/langgenius/dify/issues/2066)</sup>. The status code 400 in Dify can indicate several issues, such as invalid provider credentials or quota exhaustion <sup>[[2]](https://github.com/langgenius/dify/blob/main/api/controllers/console/app/error.py)</sup>. In your case, since you're encountering a credentials validation failure, it might be due to incorrect or incomplete credentials. To resolve this, ensure that you have correctly entered the API Key for Gitee.ai. The API Key should be obtained from [Gitee AI's dashboard](https://ai.gitee.com/dashboard/settings/tokens) and entered in the secret-input field in Dify <sup>[[3]](https://github.com/langgenius/dify/blob/main/api/core/model_runtime/model_providers/gitee_ai/gitee_ai.yaml)</sup>. Additionally, make sure that the API Key is valid and has the necessary permissions. If the issue persists, consider checking if there are any specific requirements or limitations for using the Qwen2-7B-Instruct model with Gitee.ai, such as context size or parameter rules <sup>[[4]](https://github.com/langgenius/dify/blob/main/api/core/model_runtime/model_providers/gitee_ai/llm/Qwen2-7B-Instruct.yaml)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#6531