Please add the Google Gemini interface: API URL or BASE URL. #5004

Closed
opened 2026-02-21 18:08:58 -05:00 by yindo · 4 comments
Owner

Originally created by @808cn163 on GitHub (Aug 12, 2024).

Self Checks

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

1. Is this request related to a challenge you're experiencing? Tell me about your story.

Please add the following to the Google Gemini interface: API URL or BASE URL. For example, replace:
https://generativelanguage.googleapis.com/v1beta/
with:
https://api.test.com/v1beta/
This allows users to replace it with their own custom URL, making it easier for them to access the service in regions where access is inconvenient.

2. Additional context or comments

thank you!

3. Can you help us with this feature?

  • I am interested in contributing to this feature.
Originally created by @808cn163 on GitHub (Aug 12, 2024). ### Self Checks - [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. ### 1. Is this request related to a challenge you're experiencing? Tell me about your story. Please add the following to the Google Gemini interface: API URL or BASE URL. For example, replace: https://generativelanguage.googleapis.com/v1beta/ with: https://api.test.com/v1beta/ This allows users to replace it with their own custom URL, making it easier for them to access the service in regions where access is inconvenient. ### 2. Additional context or comments thank you! ### 3. Can you help us with this feature? - [X] I am interested in contributing to this feature.
yindo added the 💪 enhancement label 2026-02-21 18:08:58 -05:00
yindo closed this issue 2026-02-21 18:08:58 -05:00
Author
Owner

@ZuzooVn commented on GitHub (Aug 13, 2024):

I do not think google-generativeai python sdk support base url at the moment
https://github.com/google-gemini/generative-ai-python/blob/36123289097d91fc5857303a85c6c428535411ba/google/generativeai/generative_models.py#L27

@ZuzooVn commented on GitHub (Aug 13, 2024): I do not think google-generativeai python sdk support base url at the moment https://github.com/google-gemini/generative-ai-python/blob/36123289097d91fc5857303a85c6c428535411ba/google/generativeai/generative_models.py#L27
Author
Owner

@baiyi-os commented on GitHub (Sep 23, 2024):

Excuse me, has it been resolved so far? I haven't seen any support for custom base URLs in the code

@baiyi-os commented on GitHub (Sep 23, 2024): Excuse me, has it been resolved so far? I haven't seen any support for custom base URLs in the code
Author
Owner

@Keith-Hon commented on GitHub (Jan 11, 2025):

There is a config for the base url

https://github.com/google-gemini/generative-ai-python/issues/188

@crazywoola

@Keith-Hon commented on GitHub (Jan 11, 2025): There is a config for the base url https://github.com/google-gemini/generative-ai-python/issues/188 @crazywoola
Author
Owner

@HaishengLiang commented on GitHub (Jul 17, 2025):

you can set os env GOOGLE_GEMINI_BASE_URL insteadof

@HaishengLiang commented on GitHub (Jul 17, 2025): you can set os env GOOGLE_GEMINI_BASE_URL insteadof
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#5004