feat: rebuild as multi-user web agent

This commit is contained in:
wuyang
2026-07-26 06:52:12 +08:00
parent 45792c8fd5
commit 37f83eaac7
634 changed files with 5060 additions and 139619 deletions
+21
View File
@@ -0,0 +1,21 @@
diff --git a/backend/open_webui/routers/openai.py b/backend/open_webui/routers/openai.py
index 9c1325e..a19f128 100644
--- a/backend/open_webui/routers/openai.py
+++ b/backend/open_webui/routers/openai.py
@@ -10,7 +10,6 @@ from urllib.parse import quote, urlparse
import aiohttp
from aiocache import cached
-from azure.identity import DefaultAzureCredential, get_bearer_token_provider
from fastapi import APIRouter, Depends, HTTPException, Request, status
from fastapi.responses import (
FileResponse,
@@ -218,6 +217,8 @@ def get_microsoft_entra_id_access_token():
Get Microsoft Entra ID access token using DefaultAzureCredential for Azure OpenAI.
Returns the token string or None if authentication fails.
"""
+ from azure.identity import DefaultAzureCredential, get_bearer_token_provider
+
try:
token_provider = get_bearer_token_provider(
DefaultAzureCredential(), 'https://cognitiveservices.azure.com/.default'