diff --git a/src/lib/components/chat/Settings/Images.svelte b/src/lib/components/chat/Settings/Images.svelte index a6463691f..8f75c0c92 100644 --- a/src/lib/components/chat/Settings/Images.svelte +++ b/src/lib/components/chat/Settings/Images.svelte @@ -116,11 +116,13 @@ class="flex flex-col h-full justify-between space-y-3 text-sm" on:submit|preventDefault={async () => { loading = true; - await updateOpenAIKey(localStorage.token, OPENAI_API_KEY); + + if (imageGenerationEngine === 'openai') { + await updateOpenAIKey(localStorage.token, OPENAI_API_KEY); + } await updateDefaultImageGenerationModel(localStorage.token, selectedModel); - await updateDefaultImageGenerationModel(localStorage.token, selectedModel); await updateImageSize(localStorage.token, imageSize).catch((error) => { toast.error(error); return null;