From eebf6438ab9b14d643ecf61d25edadcf818b69bb Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Sat, 10 Oct 2026 18:11:53 +0200 Subject: [PATCH] fix: creating a model in Manage Ollama shows no error when Ollama rejects it (#32196) When Ollama rejected a new model in the Manage Ollama dialog, for example a model definition with no base model, the form cleared and showed no error, so the admin could not tell the model was never created or why. The dialog now shows Ollama's error and keeps the entered name and definition, so the admin can correct them and try again. Fixes #32002 --- .../admin/Settings/Models/Manage/ManageOllama.svelte | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lib/components/admin/Settings/Models/Manage/ManageOllama.svelte b/src/lib/components/admin/Settings/Models/Manage/ManageOllama.svelte index 5541d77408..efa6d66ea7 100644 --- a/src/lib/components/admin/Settings/Models/Manage/ManageOllama.svelte +++ b/src/lib/components/admin/Settings/Models/Manage/ManageOllama.svelte @@ -454,6 +454,13 @@ return null; }); + if (res && !res.ok) { + createModelLoading = false; + const error = await res.json(); + toast.error(error.detail); + return; + } + if (res && res.ok) { const reader = res.body .pipeThrough(new TextDecoderStream())