"POST /console/api/workspaces/current/model-providers/langgenius/gemini/google HTTP/1.1" 400 420 #13146

Closed
opened 2026-02-21 19:10:46 -05:00 by yindo · 3 comments
Owner

Originally created by @Vampxgg on GitHub (Apr 20, 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

1.2.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Isn't DIFY able to do these details well?

Image

Image

Image

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @Vampxgg on GitHub (Apr 20, 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 1.2.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce Isn't DIFY able to do these details well? ![Image](https://github.com/user-attachments/assets/f9ec8df1-a692-49af-b009-0e7ea265a98c) ![Image](https://github.com/user-attachments/assets/1461b75f-8114-4909-abdf-b97cfbd5e661) ![Image](https://github.com/user-attachments/assets/5024b2a1-5795-411b-9f15-2c3340cfe414) ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo closed this issue 2026-02-21 19:10:46 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Apr 20, 2025):

I found a similar open issue regarding a 400 error when trying to add Google Gemini as a Model Provider in a self-hosted Dify instance. The suggested solution includes:

  1. Verify API Key Configuration: Ensure the API key is correctly configured in the google.yaml file.
  2. Check API Key Validity: Make sure the API key is valid and has the necessary permissions.
  3. Enable Debug Mode for More Information: Modify the LOG_LEVEL, DEBUG, and FLASK_DEBUG environment variables for the api service in your Docker setup to get more detailed logs.
  4. Review Specific Error Messages: Check the specific error messages or codes returned by the Google Gemini setup API endpoint in Dify to pinpoint the exact issue.

Additionally, ensure your computer can access the Google Gemini service as expected, typically it should be behind a proxy. You can find more details in the issue thread [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 (Apr 20, 2025): <!-- Answer --> I found a similar open issue regarding a 400 error when trying to add Google Gemini as a Model Provider in a self-hosted Dify instance. The suggested solution includes: 1. **Verify API Key Configuration**: Ensure the API key is correctly configured in the `google.yaml` file. 2. **Check API Key Validity**: Make sure the API key is valid and has the necessary permissions. 3. **Enable Debug Mode for More Information**: Modify the `LOG_LEVEL`, `DEBUG`, and `FLASK_DEBUG` environment variables for the `api` service in your Docker setup to get more detailed logs. 4. **Review Specific Error Messages**: Check the specific error messages or codes returned by the Google Gemini setup API endpoint in Dify to pinpoint the exact issue. Additionally, ensure your computer can access the Google Gemini service as expected, typically it should be behind a proxy. You can find more details in the [issue thread](https://github.com/langgenius/dify/issues/4571) <sup>[[1]](https://github.com/langgenius/dify/issues/4571)</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/7d40388b-265e-4e8c-abbc-4e22b327a1de?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/7d40388b-265e-4e8c-abbc-4e22b327a1de?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/7d40388b-265e-4e8c-abbc-4e22b327a1de?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/7d40388b-265e-4e8c-abbc-4e22b327a1de?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/7d40388b-265e-4e8c-abbc-4e22b327a1de?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/7d40388b-265e-4e8c-abbc-4e22b327a1de?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/7d40388b-265e-4e8c-abbc-4e22b327a1de?feedback_type=other)</sup>
Author
Owner

@crazywoola commented on GitHub (Apr 20, 2025):

Please make sure the API is official

@crazywoola commented on GitHub (Apr 20, 2025): Please make sure the API is official
Author
Owner

@Vampxgg commented on GitHub (Apr 20, 2025):

Please make sure the API is official请确保 API 是官方的

是google官方的

@Vampxgg commented on GitHub (Apr 20, 2025): > Please make sure the API is official请确保 API 是官方的 是google官方的
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#13146