From d780d386e6c59f6d67b445d3129cf46cddc17d2e Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Wed, 4 Nov 2026 22:42:51 +0100 Subject: [PATCH] fix: OpenAI image generation defaults to a model OpenAI no longer serves (#33694) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With the OpenAI image engine and no image model set, requests went out for DALL·E 2, which OpenAI has shut down, so image generation failed out of the box. The default is now GPT-IMAGE 2 and the model list no longer offers the shut-down DALL·E models. Fixes #33578 --- backend/open_webui/routers/images.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/backend/open_webui/routers/images.py b/backend/open_webui/routers/images.py index fae2410649..ab9c07a92d 100644 --- a/backend/open_webui/routers/images.py +++ b/backend/open_webui/routers/images.py @@ -203,7 +203,7 @@ async def set_image_model(request: Request, model: str): async def get_image_model(request): image_config = await get_image_config() if image_config.IMAGE_GENERATION_ENGINE == 'openai': - return image_config.IMAGE_GENERATION_MODEL if image_config.IMAGE_GENERATION_MODEL else 'dall-e-2' + return image_config.IMAGE_GENERATION_MODEL if image_config.IMAGE_GENERATION_MODEL else 'gpt-image-2' elif image_config.IMAGE_GENERATION_ENGINE == 'gemini': return image_config.IMAGE_GENERATION_MODEL if image_config.IMAGE_GENERATION_MODEL else 'imagen-3.0-generate-002' elif image_config.IMAGE_GENERATION_ENGINE == 'comfyui': @@ -366,10 +366,9 @@ async def get_models(request: Request, user=Depends(get_verified_user)): try: if image_config.IMAGE_GENERATION_ENGINE == 'openai': return [ - {'id': 'dall-e-2', 'name': 'DALL·E 2'}, - {'id': 'dall-e-3', 'name': 'DALL·E 3'}, {'id': 'gpt-image-1', 'name': 'GPT-IMAGE 1'}, {'id': 'gpt-image-1.5', 'name': 'GPT-IMAGE 1.5'}, + {'id': 'gpt-image-2', 'name': 'GPT-IMAGE 2'}, ] elif image_config.IMAGE_GENERATION_ENGINE == 'gemini': return [