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
This commit is contained in:
Classic298 2026-10-10 18:11:53 +02:00 • committed by GitHub
parent aaea99005d
commit eebf6438ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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())