mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[GH-ISSUE #19522] feat: open router image create/edit #57578
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 @davidpede on GitHub (Nov 26, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/19522
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.6.40
Ollama Version (if applicable)
No response
Operating System
Ubuntu
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
I am direct chatting with model 'gemini-3-pro-image-preview' and 'gemini-2.5-flash-image' (provided by OpenRouter). I'm not using the in-built Image Generation/Editing feature.
Actual Behavior
Steps to Reproduce
Set the following in docker environment:
CHAT_STREAM_RESPONSE_CHUNK_MAX_BUFFER_SIZE=10485760ENABLE_CHAT_RESPONSE_BASE64_IMAGE_URL_CONVERSION=trueLogs & Screenshots
Model generated image:
Uploaded image:
Additional Information
Looks possible that model generated images in the chat are not being sent with subsequent edit prompts
@Classic298 commented on GitHub (Nov 26, 2025):
@ShirasawaSama perhaps one for you when you have time
@tjbck commented on GitHub (Nov 26, 2025):
This isn't officially supported, with that being said we're open to reviewing PRs.
@tjbck commented on GitHub (Nov 27, 2025):
#19518
@wsomm commented on GitHub (Nov 28, 2025):
I ran into the same problem. I want to reserve the built-in image generation for local models with ComfyUI, but still offer Nano Banana as commercial image generation—and I have exactly the same issue. (BTW: I run Nano Banana directly via my GeminiAI account using litellm).
Editing only works if I have uploaded an image beforehand.
The cause also seems clear: The generated image is removed at some point in OWUI from the data of the assistant part of the message and is no longer available in the "chat chain" for subsequent requests.
The solution would be to leave the entire image:base64 part in the message instead of removing it. However, I lack the skills to submit a PR for this.
@siavashvj commented on GitHub (Jan 15, 2026):
I remember reading that this was fixed in one of the latest versions, but since this is still open it is still an issue right?
I'm having same experience on 0.7.2,
direct connectionusing GPT Image 1.5.Ping @Classic298
Edit: Comment on wrong issue, my bad.
@Classic298 commented on GitHub (Jan 15, 2026):
@siavashvj
this is still open because tim said he's open for PRs to add image generation support in the Admin panel > images setting, not because it doesnt work.
You CAN add models for image generation as normal models and configure the chunk size accordingly and it will work - semi work.
Wait wait - Direct connection to GPT Image 1.5? Thats not how you configure image generation for OpenAI models. Please read the docs.
@wsomm commented on GitHub (Jan 15, 2026):
What works:
Defining "Create image" / "Edit image" in the settings with Google Nano Banana.
You switch the tool on and can create and edit any image.
What doesn’t work:
Having a model Nano Banana.
You can create an image OR edit any image that is loaded in the chat interface beforehand.
You cannot edit (“refine”) any already created image.
As a great number of my users are non‑technical, even the simple switch and explaining which models they can use, is asking too much.
Summary: It doesn’t work with a model in a native way, but it is not a blocking issue in any kind.
@siavashvj commented on GitHub (Jan 15, 2026):
@wsomm I've tested this extensively now in 0.7.2 (GPT Image 1.5 for both generating and editing), and my findings are that it works when using the new Builtin Tools (native function calling). Using the legacy Image feature button, however, does not work or semi-works at best.
So this actually do work as it should (if I understand you correctly) with native function calling, in my testings.
Process:
= Third image is an image with only the horse.
@vanmilleru commented on GitHub (Apr 4, 2026):
Can a plugin be made for supporting open-router-like responses?
@Classic298 commented on GitHub (Apr 15, 2026):
When directly chatting with the model, the behaviour is model related. The model decides which image to use or what to do.
If native tool calling is used with configured image gen provider on the other hand, the chat model decides whether to call generate_image tool or edit_image tool and provides the relative image URL to specify which image(s) to edit.
for direct integration it's up to the model.
There was an issue in the past, now months ago, where the model wasn't able to see it's own generated images but i think that's long been fixed and it works for me locally on 0.8.12 when i try to edit images with openrouter via gemini models
@wsomm commented on GitHub (Apr 15, 2026):
It works with a model and the built-in tools.
It doesn't work directly with Google Nano Banana without built-in tools, which it should in my opinion.
@Classic298 commented on GitHub (Apr 15, 2026):
Only built in tools is supported, but yes it should also work directly with the model itself as well.
Can't reproduce though works from my testing
@wsomm commented on GitHub (Apr 15, 2026):
For me the work around with built-in tools is sufficient, so why bother...
(But it doesn't work directly in Nano Banana..., Gemini API Key.)