mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 14:39:31 -05:00
[GH-ISSUE #24532] issue: image_gen is exposed to the model even when image generation is disabled, and calling it causes HTTP 400 in both default and native modes #107317
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 @CoronaAustralis on GitHub (May 10, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/24532
Check Existing Issues
Installation Method
Git Clone
Open WebUI Version
v0.9.2
Ollama Version (if applicable)
No response
Operating System
windows 11
Browser (if applicable)
chrome 145
Confirmation
README.md.Expected Behavior
When image generation is disabled in the UI, the model should not see or be able to call image_gen.
If image_gen is exposed to the model, it should be callable successfully.
Tool visibility should match the actual enabled/disabled state of image generation.
Actual Behavior
In default mode, image generation is handled directly by OpenWebUI and does not go through the chat model first.
However, even when image generation is disabled in the UI, the model can still see image_gen.
If the model is explicitly forced to call image_gen, the request fails with HTTP 400.
Steps to Reproduce
Open OpenWebUI chat window and image is disabled in the tool UI intergrations.
Use default function calling mode.
Start a chat and ask the model which tools it can see.
Observe that the model can still see image_gen even though image generation is disabled.
Explicitly instruct the model to call image_gen.
Observe that the request fails with HTTP 400 and returns:
Switch to native mode.
Start a new chat or repeat the same test.
Explicitly instruct the model to call image_gen.
Observe that it fails again with the same HTTP 400 error.
Logs & Screenshots
400, message:
Got more than 131072 bytes when reading: b'data: {"id":"resp_0ddeb49b26c121170169f07fc8f1c0819190517c0a0e3592c5","object":"chat.completion.chun...'
Additional Information
This issue is specifically about
image_gen.I already understand that in default mode, OpenWebUI directly triggers image generation rather than routing it through the chat model.
The problem is that image_gen still appears to be exposed to the model even when image generation is turned off.
This creates a mismatch between UI state and model-visible tools.
It also means the model can be forced to call image_gen even though that path does not work correctly.
From testing, this does not seem to be limited to default mode, because calling
image_genin native mode also produces the same 400 error.In native mode, model can see
generate_imagetool,and ask the model to callgenerate_image, observe that it succeeds.@owui-terminator[bot] commented on GitHub (May 10, 2026):
🔍 Related Issues Found
I found some existing issues that might be related. Please check if any of these are duplicates or contain helpful solutions:
🟣 #23723 issue: Image generation enabled doesn't respect setting
Related because it is also about image generation state not being respected. That issue reports the feature being automatically turned off when unavailable, while this one reports the inverse mismatch:
image_genremains exposed even when image generation is disabled.by xNissX233 ·
bug🟣 #24265 issue: Image generation reports aiohttp ServerDisconnectedError as HTTP 400
Related because both issues concern image generation tool-call failures surfacing as HTTP 400. This one specifically documents the same 400-class error wrapping for backend image-generation failures.
by belugaming ·
bug🟣 #22545 issue: Certain Builtin Tools Not Available
Related because it shows builtin tool visibility depending on integration/menu state. It is not about image generation specifically, but it matches the broader problem of enabled/disabled builtin tools not matching what the model can actually see.
by pdp-oui ·
bug💡 If your issue is a duplicate, please close it and add any additional details to the existing issue instead.
This comment was generated automatically. React with 👍 if helpful, 👎 if not.
@tjbck commented on GitHub (May 10, 2026):
We do not have
image_genas built-in tool.