mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-22 17:42:18 -05:00
[PR #24879] [CLOSED] fix: set azure: true for Azure provider on non-azure.* hostnames #131567
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/24879
Author: @sergey-zinchenko
Created: 5/18/2026
Status: ❌ Closed
Base:
main← Head:fix/azure-provider-missing-azure-flag📝 Commits (1)
cef4a98fix: persist azure flag so custom Azure hosts work without azure.* URL📊 Changes
2 files changed (+14 additions, -7 deletions)
View changed files
📝
backend/open_webui/routers/openai.py(+10 -5)📝
src/lib/components/AddConnectionModal.svelte(+4 -2)📄 Description
Pull Request Checklist
Before submitting, make sure you've checked the following:
devfix:Changelog Entry
Description
azure./cognitive.microsoft.com). Selecting Azure OpenAI in the connection modal now persistsazure: true, and the backend treatsprovider: "azure"as Azure mode so verify and chat use deployment API paths (/openai/models,/openai/deployments/{model}/chat/completions).Added
is_azure_openai_config()helper inrouters/openai.pyfor consistent Azure routing checks.Changed
AddConnectionModal.svelte: saveazure: truewhenever Azure mode is active (including when Provider is Azure OpenAI), not only on URL auto-detection.routers/openai.py: useis_azure_openai_config()instead ofapi_config.get('azure', False)for verify, models, and chat completion routing.Deprecated
Removed
Fixed
provider: "azure"was saved withoutazure: true, so requests hit/modelsand/chat/completionsinstead of Azure deployment endpoints (#24872).Security
Breaking Changes
Additional Information
Problem
The Azure OpenAI provider in Admin Panel → Settings → Connections is intended for gateways that use the Azure deployment API (APIM, private endpoints) where the hostname does not trigger auto-detection (
azure./cognitive.microsoft.com).On save/verify, the UI used:
Choosing Azure OpenAI stored
provider: "azure"but omittedazure: true. The backend only checkedapi_config.get('azure', False), so verify and chat used generic OpenAI paths and failed on Azure-compatible gateways.Solution
azure: truewhen Azure mode is active; keepprovider: "azure"when selected.is_azure_openai_config()returns true forazure: trueorprovider === 'azure'(backward compatibility for existing saved configs).Related
Files changed
src/lib/components/AddConnectionModal.sveltebackend/open_webui/routers/openai.pyScreenshots or Videos
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.