Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Studio: model picker ranks Recommended by the Model hub's Latest ranking (#13993)
Michael Hanbcf7c81ceb81
diff --git a/studio/frontend/src/features/model-picker/components/model-selector/pickers.tsx b/studio/frontend/src/features/model-picker/components/model-selector/pickers.tsxindex da545092e21..b8060ccd9c0 100644--- a/studio/frontend/src/features/model-picker/components/model-selector/pickers.tsx+++ b/studio/frontend/src/features/model-picker/components/model-selector/pickers.tsx@@ -2833,10 +2833,12 @@ function canDeleteLoraModel(model: LoraModelOption): boolean {}-// Recommended section sort: plain HF sort keys.-type RecommendedSortKey = "trendingScore" | "lastModified";+// Recommended section sort. Latest is the Model hub's ranking (trending weighed against release age);+// the others are plain HF sort keys.+type RecommendedSortKey = "fresh" | "trendingScore" | "lastModified";const RECOMMENDED_SORT_OPTIONS: HubOption<RecommendedSortKey>[] = [+ { value: "fresh", label: "Latest" },{ value: "trendingScore", label: "Trending" },{ value: "lastModified", label: "Recent" },];@@ -3193,7 +3195,7 @@ export function HubModelPicker({const accessToken = hfApiToken(hfToken);// Recommended section: a live unsloth listing sorted by the dropdown, the same sort that drives search results.const [recommendedSort, setRecommendedSort] =- useState<RecommendedSortKey>("trendingScore");+ useState<RecommendedSortKey>("fresh");const {results,isLoading,@@ -3211,8 +3213,9 @@ export function HubModelPicker({keepUnsupportedTags: true,accessToken,// Only Recommended renders Hub results, so keep the Hub hooks idle on other tabs and preserve- // offline-local behavior.- enabled: online && section === "recommended",+ // offline-local behavior. Search rows render only with a query (showHfSection); browse reads+ // recommendedSearch, so an empty query would only fetch Latest's pools a second time.+ enabled: online && section === "recommended" && debouncedQuery.trim().length > 0,});const recommendedSearch = useHubModelSearch("", {// Audio keeps only task rows, so an untasked listing pages forever without finding one.diff --git a/studio/frontend/tests/model-picker-latest-sort.test.ts b/studio/frontend/tests/model-picker-latest-sort.test.tsnew file mode 100644index 00000000000..a84312c8f8b--- /dev/null+++ b/studio/frontend/tests/model-picker-latest-sort.test.ts@@ -0,0 +1,24 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0++// The model picker's Recommended list ranks like the Model hub's Latest feed by default.++import assert from "node:assert/strict";+import test from "node:test";++import { readSrc } from "./helpers/kit.ts";++const pickers = readSrc("features/model-picker/components/model-selector/pickers.tsx");++test("Recommended defaults to the hub's Latest ranking, with Trending and Recent still offered", () => {+ assert.match(pickers, /type RecommendedSortKey = "fresh" \| "trendingScore" \| "lastModified";/);+ assert.match(pickers, /\{ value: "fresh", label: "Latest" \},\n\s*\{ value: "trendingScore", label: "Trending" \},/);+ assert.match(pickers, /useState<RecommendedSortKey>\("fresh"\)/);+});++test("the search-only hook stays idle until there is a query, so browse fetches Latest once", () => {+ assert.match(+ pickers,+ /enabled: online && section === "recommended" && debouncedQuery\.trim\(\)\.length > 0,\n\s*\}\);\n\s*const recommendedSearch = useHubModelSearch\(""/,+ );+});