From bc40f60f6f13c679da5d1551eeccd0f4b92a9caa Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Mon, 30 Nov 2026 21:25:22 +0100 Subject: [PATCH] fix: Continue on a reply whose model is no longer available breaks the next message (#35261) Clicking Continue under a reply whose model was removed or is offline seemed to do nothing, but it marked the reply as still generating. The next message the user sent then flipped that old reply back into the generating state with a stop button, and was sent as queued behind a reply that was not running. Now Continue shows a "Model not found" error and leaves the reply as it was, and the next message sends normally. Fixes #35260 --- src/lib/components/chat/Chat.svelte | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index fea036ec81..cc5eae73f5 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -5724,15 +5724,15 @@ if (history.messages[message.id].done == true) { const responseMessage = history.messages[message.id]; - responseMessage.done = false; - responseMessage.error = null; - await tick(); - const model = ($models ?? []) .filter((m) => m.id === (responseMessage?.selectedModelId ?? responseMessage.model)) .at(0); if (model) { + responseMessage.done = false; + responseMessage.error = null; + await tick(); + await sendMessageSocket( model, createMessagesList(history, responseMessage.id), @@ -5741,6 +5741,8 @@ _chatId, { continueResponse: true } ); + } else { + toast.error($i18n.t('Model not found')); } } };