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.

Studio: don't let a malformed HF token empty the model picker's Recommended list (#7266)

oobaboogac9d479f9e361
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 766139e2b40..84119cc9925 100644
--- a/studio/frontend/src/components/assistant-ui/model-selector/pickers.tsx
+++ b/studio/frontend/src/components/assistant-ui/model-selector/pickers.tsx
@@ -47,7 +47,7 @@ import {
import { useOnlineStatus } from "@/features/hub/hooks/use-online-status";
import { isHiddenModelId } from "@/features/hub/lib/hidden-models";
import { classifyUnslothSupport } from "@/features/hub/lib/unsloth-support";
-import { useHfTokenStore } from "@/features/hub/stores/hf-token-store";
+import { hfApiToken, useHfTokenStore } from "@/features/hub/stores/hf-token-store";
import {
downloadManager,
jobKeyOf,
@@ -1411,7 +1411,8 @@ export function HubModelPicker({
// Shared Hub search stack (the same hooks the Hub page uses) so the picker
// and Hub run one implementation. Scoped to unsloth like the old listing.
const online = useOnlineStatus();
- const accessToken = hfToken || undefined;
+ // Sanitize to anonymous on a malformed token, matching the Hub page.
+ const accessToken = hfApiToken(hfToken);
// Recommended section: a live unsloth listing sorted by the dropdown. The
// same sort drives the search results so the dropdown works while searching.
const [recommendedSort, setRecommendedSort] =