From 474df5e534ef85848f32d541366f955edab4cdf9 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Mon, 8 Sep 2025 19:18:55 +0400 Subject: [PATCH] refac --- src/lib/components/AddConnectionModal.svelte | 6 +++--- src/lib/components/admin/Settings/Connections.svelte | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/lib/components/AddConnectionModal.svelte b/src/lib/components/AddConnectionModal.svelte index 02784a7abb..ecf03ee2ce 100644 --- a/src/lib/components/AddConnectionModal.svelte +++ b/src/lib/components/AddConnectionModal.svelte @@ -74,8 +74,8 @@ { url, key, - auth_type, config: { + auth_type, azure: azure, api_version: apiVersion } @@ -142,13 +142,13 @@ const connection = { url, key, - auth_type, config: { enable: enable, tags: tags, prefix_id: prefixId, model_ids: modelIds, connection_type: connectionType, + auth_type, ...(!ollama && azure ? { azure: true, api_version: apiVersion } : {}) } }; @@ -171,7 +171,7 @@ url = connection.url; key = connection.key; - auth_type = connection.auth_type ?? 'bearer'; + auth_type = connection.config.auth_type ?? 'bearer'; enable = connection.config?.enable ?? true; tags = connection.config?.tags ?? []; diff --git a/src/lib/components/admin/Settings/Connections.svelte b/src/lib/components/admin/Settings/Connections.svelte index 0b9d2874b2..03897accc6 100644 --- a/src/lib/components/admin/Settings/Connections.svelte +++ b/src/lib/components/admin/Settings/Connections.svelte @@ -261,10 +261,10 @@
{#each OPENAI_API_BASE_URLS as url, idx} { updateOpenAIHandler(); }} @@ -326,7 +326,7 @@
{#each OLLAMA_BASE_URLS as url, idx} {