mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 03:18:23 -05:00
[GH-ISSUE #12951] issue: Chunk to big error occurs when using Gemini inline image generation #32295
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ddddavid-he on GitHub (Apr 17, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/12951
Check Existing Issues
Installation Method
Git Clone
Open WebUI Version
v0.6.4
Ollama Version (if applicable)
No response
Operating System
Fedora 41
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
I am trying to use Gemini 2.0 Flash Experimental to generate image while chatting. The WebUI should have the generated image embedded into the chat contents. For example, if I send "generated an image of an apple", gemini returns things like "This is the image: [IMAGE HERE]" or just the image itself.
Actual Behavior
In the WebUI chat interface, Gemini responses: "This is the image of an apple:" and get stucked or shows a loading interface as the below figure.
By checking what the contents returned by upstream using requests, I found that there is a chunk containing
And that is what causes the
Chunk too bigerror.To be noticed, I am using
new-api(https://github.com/QuantumNous/new-api) to enable using Gemini through OpenAI API format and to enable generate image through chat (Which is not availiable in Gemini API itself as what I know).Steps to Reproduce
gemini-2.0-flash-expmodel toOpenWebUIthrough new-api .Logs & Screenshots
The logs of OpenWebUI goes while the OpenWebUI gets the image file from upstream:
Additional Information
No response