Skip to content

Commit f0d72e5

Browse files
committed
Warn that Gemini's OpenAI-compatible endpoint breaks tool calling
Users connecting Gemini through https://generativelanguage.googleapis.com/v1beta/openai get an empty assistant message on any turn where the model decides to call a tool, with nothing in the logs. Builtin tools such as Memory are affected, so it reads as the occasional blank reply rather than a tool failure, and the provider page previously said the endpoint "works well". Google's layer omits the `index` field the OpenAI streaming schema carries on every tool call, and Gemini 3 attaches a `thought_signature` it then demands back on the follow-up request. Both are deviations on Google's side, so the docs now state the limitation and give the ways around it: Function Calling set to Legacy, turning the builtin tools capability off, or a gateway such as LiteLLM or OpenRouter for real native tool calling. Reported in #28492.
1 parent 2ff5dec commit f0d72e5

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

docs/alternatives/gemini.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ Gemini models are available through Open WebUI via the Google AI API. You can us
8484
3. Add a new connection with the base URL `https://generativelanguage.googleapis.com/v1beta/openai` and your Google AI API key
8585
4. Gemini models will appear in your model selector
8686

87+
:::warning Tools need extra setup on this endpoint
88+
Google's OpenAI compatibility layer does not follow the OpenAI schema for tool calls, so a turn where the model decides to call a tool comes back as an empty assistant message. This covers the builtin tools such as Memory, so it shows up as the occasional blank reply rather than an obvious failure. Set **Function Calling** to **Legacy** in the model's Advanced Params, or route Gemini through a gateway such as LiteLLM or OpenRouter. The [OpenAI-compatible provider guide](/getting-started/quick-start/connect-a-provider/starting-with-openai-compatible) has the details.
89+
:::
90+
8791
---
8892

8993
*Gemini brings strong multimodal AI to the Google ecosystem. Open WebUI is one way to use those models alongside others, on your own infrastructure.*

docs/getting-started/quick-start/connect-a-provider/starting-with-openai-compatible.mdx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Each connection has a **toggle switch** that lets you enable or disable it witho
9494
</TabItem>
9595
<TabItem value="gemini" label="Google Gemini">
9696

97-
**Google Gemini** provides an OpenAI-compatible endpoint that works well with Open WebUI.
97+
**Google Gemini** provides an OpenAI-compatible endpoint. It works for plain chat, but its tool calling does not follow the OpenAI schema, so read the warning below before enabling tools.
9898

9999
| Setting | Value |
100100
|---|---|
@@ -106,6 +106,18 @@ Each connection has a **toggle switch** that lets you enable or disable it witho
106106
The URL must be exactly `https://generativelanguage.googleapis.com/v1beta/openai`, **without** a trailing slash. A trailing slash will break the `/models` endpoint call.
107107
:::
108108

109+
:::warning Native tool calling is broken on this endpoint
110+
Google's compatibility layer departs from the OpenAI streaming schema in two ways. It omits the `index` field that the schema carries on every streamed tool call, and Gemini 3 models attach a proprietary `thought_signature` that Google then requires back on the follow-up request. Open WebUI speaks the OpenAI schema, so on any turn where the model decides to call a tool, the call is discarded and **the assistant message arrives empty**, with nothing in the logs.
111+
112+
This includes the builtin tools such as Memory, which is why it looks intermittent: the turn only breaks when the model chooses to call something. Your options:
113+
114+
- Set **Function Calling** to **Legacy** in the model's **Advanced Params**. Tools then run through a separate non-streaming request that never touches the affected code path. Builtin tools are unavailable in this mode.
115+
- Turn the **builtin tools** capability off for the model if you only want plain chat.
116+
- For working native tool calling, put a gateway in front that translates to Google's own API, such as LiteLLM or OpenRouter, or use a pipe that calls `generateContent` directly.
117+
118+
This is a deviation on Google's side, so Open WebUI will not work around it. See [#28492](https://github.com/open-webui/open-webui/issues/28492).
119+
:::
120+
109121
</TabItem>
110122
<TabItem value="deepseek" label="DeepSeek">
111123

0 commit comments

Comments
 (0)