Skip to content

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.

Fix GGUF models missing from chat page model search

Roland Tannousa8b5b7ed588b
diff --git a/studio/frontend/src/features/onboarding/components/steps/model-selection-step.tsx b/studio/frontend/src/features/onboarding/components/steps/model-selection-step.tsx
index 747311c9a5c..5cf4ebc0b51 100644
--- a/studio/frontend/src/features/onboarding/components/steps/model-selection-step.tsx
+++ b/studio/frontend/src/features/onboarding/components/steps/model-selection-step.tsx
@@ -85,6 +85,7 @@ export function ModelSelectionStep() {
} = useHfModelSearch(debouncedQuery, {
task,
accessToken: hfToken || undefined,
+ excludeGguf: true,
});
const { error: tokenValidationError, isChecking: isCheckingToken } =
diff --git a/studio/frontend/src/features/studio/sections/model-section.tsx b/studio/frontend/src/features/studio/sections/model-section.tsx
index 5b88664fd14..3d3ede7c1fd 100644
--- a/studio/frontend/src/features/studio/sections/model-section.tsx
+++ b/studio/frontend/src/features/studio/sections/model-section.tsx
@@ -159,6 +159,7 @@ export function ModelSection() {
} = useHfModelSearch(debouncedQuery, {
task,
accessToken: hfToken || undefined,
+ excludeGguf: true,
});
const { error: tokenValidationError, isChecking: isCheckingToken } =
diff --git a/studio/frontend/src/hooks/use-hf-model-search.ts b/studio/frontend/src/hooks/use-hf-model-search.ts
index 6ba70a4d5cd..8fc0b32cf85 100644
--- a/studio/frontend/src/hooks/use-hf-model-search.ts
+++ b/studio/frontend/src/hooks/use-hf-model-search.ts
@@ -11,7 +11,6 @@ export interface HfModelResult {
}
const EXCLUDED_TAGS = new Set([
- "gguf",
"gptq",
"awq",
"exl2",
@@ -45,22 +44,27 @@ function withPopularitySort(
return fetch(url, init);
}
-function mapModel(raw: unknown): HfModelResult | null {
- const m = raw as {
- name: string;
- downloads: number;
- likes: number;
- safetensors?: { total: number };
- tags?: string[];
- };
- if (m.tags?.some((t) => EXCLUDED_TAGS.has(t))) {
- return null;
- }
- return {
- id: m.name,
- downloads: m.downloads,
- likes: m.likes,
- totalParams: m.safetensors?.total,
+function makeMapModel(excludeGguf: boolean) {
+ return (raw: unknown): HfModelResult | null => {
+ const m = raw as {
+ name: string;
+ downloads: number;
+ likes: number;
+ safetensors?: { total: number };
+ tags?: string[];
+ };
+ if (m.tags?.some((t) => EXCLUDED_TAGS.has(t))) {
+ return null;
+ }
+ if (excludeGguf && m.tags?.includes("gguf")) {
+ return null;
+ }
+ return {
+ id: m.name,
+ downloads: m.downloads,
+ likes: m.likes,
+ totalParams: m.safetensors?.total,
+ };
};
}
@@ -113,9 +117,9 @@ async function* mergedModelIterator(
export function useHfModelSearch(
query: string,
- options?: { task?: PipelineType; accessToken?: string },
+ options?: { task?: PipelineType; accessToken?: string; excludeGguf?: boolean },
) {
- const { task, accessToken } = options ?? {};
+ const { task, accessToken, excludeGguf = false } = options ?? {};
const createIter = useCallback(
() => {
@@ -135,6 +139,7 @@ export function useHfModelSearch(
[query, task, accessToken],
);
+ const mapModel = useMemo(() => makeMapModel(excludeGguf), [excludeGguf]);
const search = useHfPaginatedSearch(createIter, mapModel);
// Secondary sort guarantee: unsloth models always float to the top