From 4736f83447b9c223d040a0795bd77927c9f38fd0 Mon Sep 17 00:00:00 2001 From: Michael Han <107991372+shimmyshimmer@users.noreply.github.com> Date: Sat, 13 Jun 2026 04:15:12 -0700 Subject: [PATCH] Studio: force-refresh the llama.cpp update check so new builds are not masked by the 24h cache (#6278) Co-authored-by: Unsloth --- studio/frontend/src/hooks/use-llama-update-check.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/studio/frontend/src/hooks/use-llama-update-check.ts b/studio/frontend/src/hooks/use-llama-update-check.ts index 9532ee0735..73e12f9bff 100644 --- a/studio/frontend/src/hooks/use-llama-update-check.ts +++ b/studio/frontend/src/hooks/use-llama-update-check.ts @@ -68,6 +68,11 @@ async function fetchStatus( } } +// Update probes force a refresh so a newly published build is not masked by the +// backend's 24h release cache (the banner would otherwise lag up to a day). The +// job-progress poll below stays cached; it only reads local job state. +const recheckStatus = () => fetchStatus(true); + interface UseLlamaUpdateCheckOptions { enabled?: boolean; } @@ -161,13 +166,13 @@ export function useLlamaUpdateCheck({ let canceled = false; const firstTimer = setTimeout(() => { - fetchStatus().then((s) => { + recheckStatus().then((s) => { if (!canceled) surfaceIfAvailable(s); }); }, FIRST_CHECK_DELAY_MS); const reminder = setInterval(() => { - fetchStatus().then((s) => { + recheckStatus().then((s) => { if (!canceled) surfaceIfAvailable(s); }); }, REMINDER_INTERVAL_MS); @@ -194,7 +199,7 @@ export function useLlamaUpdateCheck({ if (snoozeTimer.current) clearTimeout(snoozeTimer.current); snoozeTimer.current = setTimeout(() => { snoozeTimer.current = null; - fetchStatus().then(surfaceIfAvailable); + recheckStatus().then(surfaceIfAvailable); }, SNOOZE_DELAY_MS); }, [surfaceIfAvailable]);