gemini api add error!!! #594

Closed
opened 2026-02-16 10:19:51 -05:00 by yindo · 2 comments
Owner

Originally created by @Vampxgg on GitHub (Aug 27, 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 Dify issues & Dify Official Plugins, 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.7.2

Plugin version

0.5.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

2025-08-27 04:14:44.073 DEBUG [Dummy-33] [connectionpool.py:241] - Starting new HTTP connection (1): plugin_daemon:5002
2025-08-27 04:14:44.091 DEBUG [Dummy-33] [connectionpool.py:544] - http://plugin_daemon:5002 "GET /plugin/72305e0d-3ec5-4ff1-871b-3f11ee2f754a/management/models?page=1&page_size=256 HTTP/1.1" 200 None
2025-08-27 04:14:44.230 DEBUG [Dummy-33] [opendal_storage.py:52] - file privkeys/72305e0d-3ec5-4ff1-871b-3f11ee2f754a/private.pem loaded
2025-08-27 04:14:44.352 DEBUG [Dummy-33] [connectionpool.py:241] - Starting new HTTP connection (1): plugin_daemon:5002

Image

✔️ Error log

No response

Originally created by @Vampxgg on GitHub (Aug 27, 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 [Dify issues](https://github.com/langgenius/dify/issues) & [Dify Official Plugins](https://github.com/langgenius/dify-official-plugins/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.7.2 ### Plugin version 0.5.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 2025-08-27 04:14:44.073 DEBUG [Dummy-33] [connectionpool.py:241] - Starting new HTTP connection (1): plugin_daemon:5002 2025-08-27 04:14:44.091 DEBUG [Dummy-33] [connectionpool.py:544] - http://plugin_daemon:5002 "GET /plugin/72305e0d-3ec5-4ff1-871b-3f11ee2f754a/management/models?page=1&page_size=256 HTTP/1.1" 200 None 2025-08-27 04:14:44.230 DEBUG [Dummy-33] [opendal_storage.py:52] - file privkeys/72305e0d-3ec5-4ff1-871b-3f11ee2f754a/private.pem loaded 2025-08-27 04:14:44.352 DEBUG [Dummy-33] [connectionpool.py:241] - Starting new HTTP connection (1): plugin_daemon:5002 <img width="1189" height="697" alt="Image" src="https://github.com/user-attachments/assets/18194aa1-5564-42e1-a0b8-83f82982738d" /> ### ✔️ Error log _No response_
yindo closed this issue 2026-02-16 10:19:51 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Aug 27, 2025):

The most common cause of Gemini API add errors in Dify is that the platform tries to validate your API key using the deprecated gemini-pro model, which is no longer supported by Google's API and results in a 404 error. To fix this, make sure you select a supported Gemini model such as gemini-1.5-pro-latest, gemini-2.0-flash, or gemini-1.5-flash when configuring the integration. You can use the list_models() function from the Google Generative AI Python library to check which models your API key supports [source].

Recent updates to the Gemini plugin (now at version 0.5.1) added filtering for unsupported document types and improved memory handling, which helps prevent errors during file uploads [source]. Also, the credentials validation method was updated to use a direct API call with genai.Client, and the default model for validation is now gemini-2.5-flash [source].

If you still see errors, double-check that your API key is valid, your Dify and Gemini plugin versions are up to date, and you are not trying to upload unsupported document types. If possible, provide the exact error message you see when saving the Gemini API configuration—this will help pinpoint the issue faster.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (Aug 27, 2025): <!-- Answer --> The most common cause of Gemini API add errors in Dify is that the platform tries to validate your API key using the deprecated `gemini-pro` model, which is no longer supported by Google's API and results in a 404 error. To fix this, make sure you select a supported Gemini model such as `gemini-1.5-pro-latest`, `gemini-2.0-flash`, or `gemini-1.5-flash` when configuring the integration. You can use the `list_models()` function from the Google Generative AI Python library to check which models your API key supports [[source]](https://github.com/langgenius/dify-official-plugins/issues/1456). Recent updates to the Gemini plugin (now at version 0.5.1) added filtering for unsupported document types and improved memory handling, which helps prevent errors during file uploads [[source]](https://github.com/langgenius/dify-official-plugins/pull/1567). Also, the credentials validation method was updated to use a direct API call with `genai.Client`, and the default model for validation is now `gemini-2.5-flash` [[source]](https://github.com/langgenius/dify-official-plugins/pull/1539). If you still see errors, double-check that your API key is valid, your Dify and Gemini plugin versions are up to date, and you are not trying to upload unsupported document types. If possible, provide the exact error message you see when saving the Gemini API configuration—this will help pinpoint the issue faster. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/e5407589-9300-4e6e-82de-6b29b5e56ba7?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/e5407589-9300-4e6e-82de-6b29b5e56ba7?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/e5407589-9300-4e6e-82de-6b29b5e56ba7?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/e5407589-9300-4e6e-82de-6b29b5e56ba7?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/e5407589-9300-4e6e-82de-6b29b5e56ba7?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/e5407589-9300-4e6e-82de-6b29b5e56ba7?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/e5407589-9300-4e6e-82de-6b29b5e56ba7?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify-official-plugins/issues/1590)
Author
Owner

@crazywoola commented on GitHub (Aug 27, 2025):

I didn't see any useful logs here. Afaik, the can be added successfully.

@crazywoola commented on GitHub (Aug 27, 2025): I didn't see any useful logs here. Afaik, the can be added successfully.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#594