mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-05 18:38:17 -05:00
[PR #17147] [MERGED] feat: Azure OpenAI image generation support #24335
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/17147
Author: @anfuerer
Created: 9/2/2025
Status: ✅ Merged
Merged: 9/3/2025
Merged by: @tjbck
Base:
dev← Head:dev📝 Commits (2)
bc6afc9feature: Azure OpenAI image generation supportdf0d29cstyle: fix formatting issues📊 Changes
4 files changed (+55 additions, -13 deletions)
View changed files
📝
backend/open_webui/config.py(+6 -0)📝
backend/open_webui/main.py(+2 -0)📝
backend/open_webui/routers/images.py(+13 -1)📝
src/lib/components/admin/Settings/Images.svelte(+34 -12)📄 Description
The image generation API used on Azure OpenAI requires to specify the API version by appending an
api-versionquery parameter to the endpoint URL. Added the environment variableIMAGES_OPENAI_API_VERSIONwith configuration functionality in the administration UI.Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
See https://github.com/open-webui/open-webui/discussions/16274
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
The image generation API used on Azure OpenAI requires to specify the API version by appending an
api-versionquery parameter to the endpoint URL. Added the environment variableIMAGES_OPENAI_API_VERSIONwith configuration functionality in the administration UI.Added
IMAGES_OPENAI_API_VERSIONChanged
/images/generationsendpoint a query parameter is appended in case the configurationIMAGES_OPENAI_API_VERSIONis defined.Additional Information
Please note that the image generation API call automatically appends the path
/images/generationsto the outgoing calls to the OpenAPI endpoints. When configuring the Azure Open AI URL, make sure to only configure the necessary host and path (without the/images/generationspart). This behaviour hasn't changed with this PR. I'm just emphasising the lessons learnt.Screenshots or Videos
API version can be configured in the admin section

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.