mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #21459] [CLOSED] fix: pass background parameter to OpenAI Image Edit API #49138
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?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/21459
Author: @sangyongsin
Created: 2/16/2026
Status: ❌ Closed
Base:
dev← Head:fix/image-edit-background-parameter📝 Commits (2)
b266434fix/image-edit-background-parameterb4d0336fix/image-edit-background-parameter📊 Changes
2 files changed (+5 additions, -1 deletions)
View changed files
📝
backend/open_webui/routers/images.py(+2 -0)📝
backend/open_webui/tools/builtin.py(+3 -1)📄 Description
Pull Request Checklist
devfix:Changelog Entry
Description
The OpenAI Image Edit API (
gpt-image-1) supports abackgroundparameter with values"transparent","opaque", or"auto", but Open WebUI does not pass this parameter through. This means users cannotcontrol background transparency when editing images via the built-in tool.
Added
backgroundfield toEditImageFormmodel ("transparent","opaque", or"auto")backgroundparameter toedit_imagebuilt-in tool function with docstringChanged
Deprecated
Removed
Fixed
backgroundparameter is now passed to the OpenAI Image Edit API when providedSecurity
Breaking Changes
Additional Information
**({"background": form_data.background} if form_data.background else {})same as other optional parameters likesize,nNone, so no breaking change to existing behaviorScreenshots or Videos
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and
I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.