From bcb382def978cf137ec5cd29fcbf0533b299a0d9 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Sun, 15 Mar 2026 07:24:54 +0000 Subject: [PATCH] studio: sort downloaded GGUF variants before recommended Downloaded variants now take priority over the recommended badge in sort order. Within the same tier (downloaded+fits, etc.), recommended still sorts first. Order: downloaded -> recommended -> fits -> tight -> OOM --- .../components/assistant-ui/model-selector/pickers.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/studio/frontend/src/components/assistant-ui/model-selector/pickers.tsx b/studio/frontend/src/components/assistant-ui/model-selector/pickers.tsx index 1df2c89808..10b8aed8e7 100644 --- a/studio/frontend/src/components/assistant-ui/model-selector/pickers.tsx +++ b/studio/frontend/src/components/assistant-ui/model-selector/pickers.tsx @@ -239,14 +239,15 @@ function GgufVariantExpander({ return v.downloaded ? base : base + 2; }; return [...variants].sort((a, b) => { - const aIsRec = a.quant === effectiveRecommended; - const bIsRec = b.quant === effectiveRecommended; - if (aIsRec !== bIsRec) return aIsRec ? -1 : 1; - const aTier = tierOf(a); const bTier = tierOf(b); if (aTier !== bTier) return aTier - bTier; + // Within the same tier, recommended goes first + const aIsRec = a.quant === effectiveRecommended; + const bIsRec = b.quant === effectiveRecommended; + if (aIsRec !== bIsRec) return aIsRec ? -1 : 1; + // fits/tight: largest first (best quality); OOM: smallest first return aTier === 4 ? a.size_bytes - b.size_bytes : b.size_bytes - a.size_bytes; });