Timothy Jaeryang Baek 1 lună în urmă
părinte
comite
6f6412dd16

+ 1 - 1
backend/open_webui/routers/openai.py

@@ -166,7 +166,7 @@ def get_headers_and_cookies(
     elif auth_type == "session":
         cookies = request.cookies
         token = request.state.token.credentials
-    elif auth_type == "oauth":
+    elif auth_type == "system_oauth":
         cookies = request.cookies
 
         oauth_token = None

+ 1 - 1
backend/open_webui/utils/tools.py

@@ -135,7 +135,7 @@ async def get_tools(
                         headers["Authorization"] = (
                             f"Bearer {request.state.token.credentials}"
                         )
-                    elif auth_type == "oauth":
+                    elif auth_type == "system_oauth":
                         cookies = request.cookies
                         oauth_token = extra_params.get("__oauth_token__", None)
                         if oauth_token:

+ 2 - 2
src/lib/components/AddConnectionModal.svelte

@@ -330,7 +330,7 @@
 											{#if !ollama}
 												<option value="session">{$i18n.t('Session')}</option>
 												{#if !direct}
-													<option value="oauth">{$i18n.t('OAuth')}</option>
+													<option value="system_oauth">{$i18n.t('OAuth')}</option>
 												{/if}
 											{/if}
 										</select>
@@ -355,7 +355,7 @@
 											>
 												{$i18n.t('Forwards system user session credentials to authenticate')}
 											</div>
-										{:else if auth_type === 'oauth'}
+										{:else if auth_type === 'system_oauth'}
 											<div
 												class={`text-xs self-center translate-y-[1px] ${($settings?.highContrastMode ?? false) ? 'text-gray-800 dark:text-gray-100' : 'text-gray-500'}`}
 											>

+ 1 - 1
src/lib/components/AddServerModal.svelte

@@ -289,7 +289,7 @@
 											<option value="session">{$i18n.t('Session')}</option>
 
 											{#if !direct}
-												<option value="oauth">{$i18n.t('OAuth')}</option>
+												<option value="system_oauth">{$i18n.t('OAuth')}</option>
 											{/if}
 										</select>
 									</div>