From 9cc00afc6b25675f0b3d070a707eb79334a62d29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=96=B9=E4=BA=AE?= Date: Tue, 6 May 2025 10:17:22 +0800 Subject: [PATCH] fix: support gpt-image-1 with correct parameter --- backend/open_webui/routers/images.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/open_webui/routers/images.py b/backend/open_webui/routers/images.py index 22fd8ac71..5d2f9809a 100644 --- a/backend/open_webui/routers/images.py +++ b/backend/open_webui/routers/images.py @@ -501,9 +501,9 @@ async def image_generations( else request.app.state.config.IMAGE_SIZE ), **( - {"response_format": "b64_json"} + {} if "gpt-image-1" in request.app.state.config.IMAGE_GENERATION_MODEL - else {} + else {"response_format": "b64_json"} ), }