Description:
I am encountering a warning when using Gemini models in Open WebUI. The issue manifests both in the user interface (UI) and in the backend logs.
Observed Behavior:
- A frontend popup appears with the error message:
There was a problem retrieving the messages from the backend database.
- Concurrently, the following warning appears in the Open WebUI backend logs:
Messages in the body (1) and messages in the database (3) do not match. This is likely due to a bug in Open WebUI. Cannot process files or filter citations.
Steps to Reproduce:
- Open Open WebUI in your browser.
- Select a Gemini-based model (e.g.,
gemini-2.5-flash).
- Start a new conversation.
- Send a second message .
- After receiving reply no.
2 from AI, the error occurs.
Actual Result:
- Frontend: The following popup is displayed:
There was a problem retrieving the messages from the backend database.
- Backend Log: The Open WebUI console/log shows this warning:
2025-07-27 20:00:35.083 | WARNING | function_gemini_manifold_google_genai:_fetch_and_validate_chat_history:205 - Messages in the body (1) and messages in the database (3) do not match. This is likely due to a bug in Open WebUI. Cannot process files or filter citations.
- Extract chat:
chat-export-1753647680201.json
chat-extract-html-element.txt
Expected Result:
- The conversation with the Gemini model should proceed smoothly without errors.
- No error popups or log warnings related to chat history mismatch should appear.
- All features, including file processing and citations, should be fully usable.
Environment:
-
Open WebUI Version: v0.6.18
-
Gemini Manifold google_genai Version: 1.22.0
-
Open WebUI Installation Method: Docker
-
Browser: Vivaldi 7.5.3735.54
-
Gemini Model Used: gemini-2.5-flash
-
Tested also on another device - Android
Additional Context / Questions:
The message Messages in the body (1) and messages in the database (3) do not match suggests a mismatch between the chat history state sent to the model and the state stored in the Open WebUI database. I would appreciate assistance in determining the root cause:
- Is this an Open WebUI database integrity issue?
- Or is the error caused by an incompatibility between Open WebUI version (v0.6.18) and Gemini Manifold / Google GenAI version (1.22.0)?
Description:
I am encountering a warning when using Gemini models in Open WebUI. The issue manifests both in the user interface (UI) and in the backend logs.
Observed Behavior:
There was a problem retrieving the messages from the backend database.Messages in the body (1) and messages in the database (3) do not match. This is likely due to a bug in Open WebUI. Cannot process files or filter citations.Steps to Reproduce:
gemini-2.5-flash).2 from AI, the error occurs.
Actual Result:
chat-export-1753647680201.json
chat-extract-html-element.txt
Expected Result:
Environment:
Open WebUI Version:
v0.6.18Gemini Manifold google_genai Version:
1.22.0Open WebUI Installation Method:
DockerBrowser:
Vivaldi 7.5.3735.54Gemini Model Used:
gemini-2.5-flashTested also on another device - Android
Additional Context / Questions:
The message
Messages in the body (1) and messages in the database (3) do not matchsuggests a mismatch between the chat history state sent to the model and the state stored in the Open WebUI database. I would appreciate assistance in determining the root cause: