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 cc399c39c5..b24536d2f7 100644
--- a/studio/frontend/src/components/assistant-ui/model-selector/pickers.tsx
+++ b/studio/frontend/src/components/assistant-ui/model-selector/pickers.tsx
@@ -191,21 +191,6 @@ function GgufVariantExpander({
[repoId, onSelect],
);
- if (loading) {
- return (
-
-
- Loading variants…
-
- );
- }
-
- if (error) {
- return (
- {error}
- );
- }
-
const sortedVariants = useMemo(() => {
if (!variants) return variants;
return [...variants].sort((a, b) => {
@@ -223,6 +208,21 @@ function GgufVariantExpander({
});
}, [variants, defaultVariant, gpuGb]);
+ if (loading) {
+ return (
+
+
+ Loading variants…
+
+ );
+ }
+
+ if (error) {
+ return (
+ {error}
+ );
+ }
+
if (!sortedVariants || sortedVariants.length === 0) {
return (