diff --git a/src/lib/components/chat/SettingsModal.svelte b/src/lib/components/chat/SettingsModal.svelte index dbca0e79..5d4334c4 100644 --- a/src/lib/components/chat/SettingsModal.svelte +++ b/src/lib/components/chat/SettingsModal.svelte @@ -323,7 +323,9 @@ return null; }); - const openAIModels = openaiModelRes?.data ?? null; + const openAIModels = Array.isArray(openaiModelRes) + ? openaiModelRes + : openaiModelRes?.data ?? null; models.push( ...(openAIModels diff --git a/src/routes/(app)/+layout.svelte b/src/routes/(app)/+layout.svelte index 94d242e1..af8c7522 100644 --- a/src/routes/(app)/+layout.svelte +++ b/src/routes/(app)/+layout.svelte @@ -74,7 +74,9 @@ return null; }); - const openAIModels = openaiModelRes?.data ?? null; + const openAIModels = Array.isArray(openaiModelRes) + ? openaiModelRes + : openaiModelRes?.data ?? null; models.push( ...(openAIModels