[GH-ISSUE #17403] issue: Gemini API - OpenAI Auth Failure #18273

Closed
opened 2026-04-20 00:28:28 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @Robertde34 on GitHub (Sep 12, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/17403

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

v.06.28

Ollama Version (if applicable)

0.11.10

Operating System

Windows Docker

Browser (if applicable)

every Browser

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

(Admin Settings → Connections → OpenAI API)

URL: https://generativelanguage.googleapis.com/v1beta/openai/

Authentication: API_Key

Documentation:
https://ai.google.dev/gemini-api/docs/openai?hl=en

Actual Behavior

WebUI don't get access direct to Gemini API (Admin Settings → Connections → OpenAI API)

The Open WebUI user interface has changed again, and the “Generative AI” option is no longer directly selectable as a provider.

This has caused confusion among many users. The Gemini API must be configured via the OpenAI-compatible interface provided by Open WebUI.

The problem is that Open Webui treats the Gemini API as a kind of OpenAI-compatible endpoint, but does not translate all authentication details correctly. In most cases, when using the OpenAI connection for Gemini, the API expects the key to be passed as a “bearer token” in the URL, rather than as a simple API key.

API-Key in URL also doesn't work.
https://generativelanguage.googleapis.com/v1beta/models?key=API_Key

MY API Key is tested and is working in other APP, simple by paste API Key and this URL.
base_url="https://generativelanguage.googleapis.com/v1beta/openai/

Steps to Reproduce

WebUI (Admin Settings → Connections → OpenAI API)

URL: https://generativelanguage.googleapis.com/v1beta/openai/

Authentication bearer: Gemini_API_Key

Logs & Screenshots

Screenshot-838

Additional Information

Please update WebUI OpenAI API Documentation after fixing this issue.

Originally created by @Robertde34 on GitHub (Sep 12, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/17403 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v.06.28 ### Ollama Version (if applicable) 0.11.10 ### Operating System Windows Docker ### Browser (if applicable) every Browser ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior (Admin Settings → Connections → OpenAI API) URL: https://generativelanguage.googleapis.com/v1beta/openai/ Authentication: API_Key Documentation: https://ai.google.dev/gemini-api/docs/openai?hl=en ### Actual Behavior WebUI don't get access direct to Gemini API (Admin Settings → Connections → OpenAI API) The Open WebUI user interface has changed again, and the “Generative AI” option is no longer directly selectable as a provider. This has caused confusion among many users. The Gemini API must be configured via the OpenAI-compatible interface provided by Open WebUI. The problem is that Open Webui treats the Gemini API as a kind of OpenAI-compatible endpoint, but does not translate all authentication details correctly. In most cases, when using the OpenAI connection for Gemini, the API expects the key to be passed as a “bearer token” in the URL, rather than as a simple API key. API-Key in URL also doesn't work. https://generativelanguage.googleapis.com/v1beta/models?key=API_Key MY API Key is tested and is working in other APP, simple by paste API Key and this URL. base_url="https://generativelanguage.googleapis.com/v1beta/openai/ ### Steps to Reproduce WebUI (Admin Settings → Connections → OpenAI API) URL: https://generativelanguage.googleapis.com/v1beta/openai/ Authentication bearer: Gemini_API_Key ### Logs & Screenshots <img width="387" height="135" alt="Screenshot-838" src="https://github.com/user-attachments/assets/2cf4bdaa-0bbc-445d-b651-90dc24434922" /> ### Additional Information Please update WebUI OpenAI API Documentation after fixing this issue.
GiteaMirror added the bug label 2026-04-20 00:28:28 -05:00
Author
Owner

@tjbck commented on GitHub (Sep 12, 2025):

Image

Unable to reproduce, works as intended.

<!-- gh-comment-id:3286605904 --> @tjbck commented on GitHub (Sep 12, 2025): <img width="1510" height="372" alt="Image" src="https://github.com/user-attachments/assets/650cd532-09d3-4460-8302-1e6ae612af20" /> Unable to reproduce, works as intended.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#18273