From 66781abc58578cbfa52e5078bea4dade02209669 Mon Sep 17 00:00:00 2001 From: danielhanchen Date: Sat, 20 Jun 2026 04:11:19 +0000 Subject: [PATCH] Studio: fix llama.cpp update toast tag and reload hint The post-update toast used the job's to_tag, which is the bare bNNNN build number (same as installed_tag), so it showed e.g. "b9726" instead of the full release tag. Use status.latest_tag (e.g. b9726-mix-) to match the tag the banner already shows, falling back to to_tag and then a generic label. Also drop "Reload your model to use it." when there is nothing to reload: only append it when a local model is loaded, since external-provider models do not use llama.cpp. --- .../src/components/llama-update-banner.tsx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/studio/frontend/src/components/llama-update-banner.tsx b/studio/frontend/src/components/llama-update-banner.tsx index 0383d8a150..0daade512b 100644 --- a/studio/frontend/src/components/llama-update-banner.tsx +++ b/studio/frontend/src/components/llama-update-banner.tsx @@ -2,6 +2,7 @@ // Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0 import { Button } from "@/components/ui/button"; +import { isExternalModelId, useChatRuntimeStore } from "@/features/chat"; import { useLlamaUpdateCheck } from "@/hooks/use-llama-update-check"; import { useShowLlamaUpdateBanner } from "@/hooks/use-llama-update-pref"; import { toast } from "@/lib/toast"; @@ -99,9 +100,18 @@ export function LlamaUpdateBanner({ async function handleUpdate() { const result = await apply(); if (result?.ok) { - toast.success( - `llama.cpp updated to ${result.tag ?? "the latest build"}. Reload your model to use it.`, - ); + // Prefer the full release tag (e.g. b9726-mix-); the job's to_tag and + // installed_tag are the bare bNNNN build number. + const updatedTag = status?.latest_tag ?? result.tag ?? "the latest build"; + // Only a loaded local model can be reloaded to pick up the new binary; + // external-provider models do not use llama.cpp at all. + const checkpoint = useChatRuntimeStore.getState().params.checkpoint; + const hasLocalModel = + Boolean(checkpoint) && !isExternalModelId(checkpoint); + const reloadHint = hasLocalModel + ? " Reload your model to use it." + : ""; + toast.success(`llama.cpp updated to ${updatedTag}.${reloadHint}`); } else if (result) { toast.error( `llama.cpp update failed: ${result.error ?? "unknown error"}`,