From 6f6412dd16c63c2bb4df79a96b814bf69cb3f880 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Mon, 8 Sep 2025 19:53:44 +0400 Subject: [PATCH] refac --- backend/open_webui/routers/openai.py | 2 +- backend/open_webui/utils/tools.py | 2 +- src/lib/components/AddConnectionModal.svelte | 4 ++-- src/lib/components/AddServerModal.svelte | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/open_webui/routers/openai.py b/backend/open_webui/routers/openai.py index d7b5f75260..184f47038d 100644 --- a/backend/open_webui/routers/openai.py +++ b/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 diff --git a/backend/open_webui/utils/tools.py b/backend/open_webui/utils/tools.py index fd441df9e1..0ef0cf47fb 100644 --- a/backend/open_webui/utils/tools.py +++ b/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: diff --git a/src/lib/components/AddConnectionModal.svelte b/src/lib/components/AddConnectionModal.svelte index 900dc74d2b..fb4da3175f 100644 --- a/src/lib/components/AddConnectionModal.svelte +++ b/src/lib/components/AddConnectionModal.svelte @@ -330,7 +330,7 @@ {#if !ollama} {#if !direct} - + {/if} {/if} @@ -355,7 +355,7 @@ > {$i18n.t('Forwards system user session credentials to authenticate')} - {:else if auth_type === 'oauth'} + {:else if auth_type === 'system_oauth'}
diff --git a/src/lib/components/AddServerModal.svelte b/src/lib/components/AddServerModal.svelte index fd70534d28..e35421a091 100644 --- a/src/lib/components/AddServerModal.svelte +++ b/src/lib/components/AddServerModal.svelte @@ -289,7 +289,7 @@ {#if !direct} - + {/if}