The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.
TypeScript agentai-chatai-studioall-in-onecoding-agentdesktop-appfluximage-generationlinuxllmlocal-ailocal-llmopen-sourceprivacyself-hostedstable-diffusionuncensoreduncensored-aivideo-generationwindows
Warn about small chat models and exclude them from starter picks
Davida5fdb14e26a4
diff --git a/e2e/small-model-warning.spec.ts b/e2e/small-model-warning.spec.tsnew file mode 100644index 00000000..da3a9bcc--- /dev/null+++ b/e2e/small-model-warning.spec.ts@@ -0,0 +1,36 @@+import { test, expect } from '@playwright/test'+import { tauriMockInit, DEFAULT_ASSISTANT_REPLY, DEFAULT_MODEL_NAME } from './support/tauri-mock'+import { seedOnboardingDone } from './support/cloud-mock'++test('catalog warning is fully readable and retained in model details', async ({ page }) => {+ await page.addInitScript(tauriMockInit, { assistantReply: DEFAULT_ASSISTANT_REPLY, modelName: DEFAULT_MODEL_NAME })+ await page.addInitScript(() => {+ const bridge = (window as unknown as { __TAURI_INTERNALS__: { invoke: (command: string, args: unknown) => Promise<unknown> } }).__TAURI_INTERNALS__+ const invoke = bridge.invoke+ bridge.invoke = (command, args) => command === 'detect_gpus'+ ? Promise.resolve([{ index: 0, vendor: 'nvidia', name: 'Test GPU', memory_mib: 12288, source: 'fixture' }])+ : invoke(command, args)+ })+ await seedOnboardingDone(page)+ await page.goto('/')+ await page.getByRole('button', { name: 'Models', exact: true }).click()+ await page.getByRole('button', { name: 'Unfiltered', exact: true }).click()+ const recommendations = page.getByRole('region', { name: 'Start here', exact: true })+ await expect(recommendations).toBeVisible()+ await expect(recommendations.getByTestId('small-chat-model-warning')).toHaveCount(0)+ await expect(recommendations.locator('[data-model-tile="Hermes 3 Llama 3.2 3B"]')).toHaveCount(0)+ const tile = page.locator('[data-model-tile="Hermes 3 Llama 3.2 3B"]')+ const warning = tile.getByTestId('small-chat-model-warning')+ await warning.scrollIntoViewIfNeeded()+ await expect(warning).toContainText('Not recommended for chat or agent work.')+ await page.setViewportSize({ width: 390, height: 844 })+ await warning.scrollIntoViewIfNeeded()+ await expect(warning).toBeVisible()+ const unclipped = await warning.evaluate(element => {+ const style = getComputedStyle(element)+ return element.scrollHeight <= element.clientHeight && style.webkitLineClamp === 'none'+ })+ expect(unclipped).toBe(true)+ await tile.getByRole('button', { name: 'Details for Hermes 3 Llama 3.2 3B', exact: true }).click()+ await expect(page.getByRole('dialog').getByText(/Below 7B:/)).toBeVisible()+})diff --git a/src/components/models/DiscoverModels.tsx b/src/components/models/DiscoverModels.tsxindex f5ce8ea7..c9cc9edc 100644--- a/src/components/models/DiscoverModels.tsx+++ b/src/components/models/DiscoverModels.tsx@@ -1,4 +1,5 @@import { useCallback, useState, useEffect, useRef } from 'react'+import { chatRecommendationGroups, isBelowChatMinimum, SMALL_CHAT_MODEL_WARNING } from '../../lib/chat-model-minimum'import { bundleIsComplete, bundleIsDownloading, bundleHasErrors } from '../../lib/bundle-state'import { motion } from 'framer-motion'import { Search, XCircle, Loader2, Sparkles, Unlock, ShieldCheck, ExternalLink, Download, CheckCircle, Info } from 'lucide-react'@@ -847,7 +848,7 @@ export function DiscoverModels({ category, search = '', searchSubmitToken = 0 }:// catalog data and no picks while searching or filtering.const showPicks = isText && !search && vramTier === 'all' && textGroups.length > 4const scoredGroups = showPicks- ? [...textGroups]+ ? chatRecommendationGroups(textGroups).map(g => {const rep = pickDefaultVariant(g, systemVRAM, isModelFullyInstalled, getModelDownloadState)let score = 0@@ -1167,7 +1168,7 @@ export function DiscoverModels({ category, search = '', searchSubmitToken = 0 }:<>{/* Start here — derived picks for the active tab */}{topPicks.length >= 2 && (- <div className="space-y-1.5">+ <div className="space-y-1.5" role="region" aria-label="Start here"><div className="flex items-center gap-1.5 px-1"><Sparkles size={11} className="text-gray-400 dark:text-gray-500" /><h3 className="t-micro font-semibold uppercase tracking-[0.12em] text-gray-700 dark:text-gray-300">Start here</h3>@@ -1239,6 +1240,7 @@ export function DiscoverModels({ category, search = '', searchSubmitToken = 0 }:{infoModel && (<div className="space-y-3"><p className="text-[0.72rem] text-gray-700 dark:text-gray-200 leading-relaxed">{infoModel.description}</p>+ {isBelowChatMinimum(infoModel) && <p className="text-xs leading-relaxed text-gray-700 dark:text-gray-200">{SMALL_CHAT_MODEL_WARNING}</p>}<div className="flex items-center gap-1.5 flex-wrap">{infoModel.tags.map(t => (<span key={t} className="t-micro px-1.5 py-0.5 rounded bg-gray-100 dark:bg-white/5 text-gray-600 dark:text-gray-400">{t}</span>diff --git a/src/components/models/ModelTiles.tsx b/src/components/models/ModelTiles.tsxindex 4897b163..7c75bf0e 100644--- a/src/components/models/ModelTiles.tsx+++ b/src/components/models/ModelTiles.tsx@@ -4,6 +4,7 @@// handlers (Ollama routing, sharded confirm, bundle retry/clear, …) keep// working unchanged behind a new surface.import { useEffect, useRef, useState } from 'react'+import { isBelowChatMinimum, SMALL_CHAT_MODEL_WARNING } from '../../lib/chat-model-minimum'import {Download, ExternalLink, Info, Check, ChevronDown, Loader2, RefreshCw,X, Flame, Wrench, Eye, Feather, HardDrive,@@ -407,6 +408,12 @@ export function ModelTile({ variants, vramGb, isInstalled, dlState, onDownload,</button></div>+ {isBelowChatMinimum(sel) && (+ <p data-testid="small-chat-model-warning" className="mt-2 text-xs leading-relaxed text-gray-700 dark:text-gray-200">+ {SMALL_CHAT_MODEL_WARNING}+ </p>+ )}+<div className="flex items-center gap-2 mt-2.5 min-h-[var(--control-h-sm)]">{/* Variant / size selector — only when the family ships several quants */}{variants.length > 1 ? (diff --git a/src/lib/__tests__/chat-model-minimum.test.ts b/src/lib/__tests__/chat-model-minimum.test.tsnew file mode 100644index 00000000..7db013db--- /dev/null+++ b/src/lib/__tests__/chat-model-minimum.test.ts@@ -0,0 +1,27 @@+import { describe, expect, it } from 'vitest'+import { getMainstreamTextModels, getUncensoredTextModels } from '../../api/discover'+import { chatRecommendationGroups, isBelowChatMinimum } from '../chat-model-minimum'++describe('chat catalog minimum', () => {+ it('uses parameter counts, not quantization, file size or MoE active counts', () => {+ for (const tag of ['0.5B', '3B', '3.8B', '4B', '6.9B']) expect(isBelowChatMinimum({ tags: [tag] })).toBe(true)+ for (const tag of ['7B', '8B', '70B', '3 GB', 'Q4_K_M', 'A3B', '30B-A3B', 'unknown']) expect(isBelowChatMinimum({ tags: [tag] })).toBe(false)+ })++ it('covers every explicitly tagged sub-7B entry in both text catalogs', () => {+ const models = [...getUncensoredTextModels(), ...getMainstreamTextModels()]+ const small = models.filter(isBelowChatMinimum)+ expect(small.length).toBe(12)+ const picks = chatRecommendationGroups(models.map(model => [model]))+ expect(picks.flat().some(isBelowChatMinimum)).toBe(false)+ expect(picks.length).toBe(models.length - small.length)+ expect(small.find(model => model.filename === 'Hermes-3-Llama-3.2-3B.Q4_K_M.gguf')).toBeDefined()+ })++ it('excludes mixed-size groups so a selected small variant cannot become a pick', () => {+ const models = getUncensoredTextModels()+ const small = models.find(isBelowChatMinimum)!+ const large = models.find(model => model.tags.includes('8B'))!+ expect(chatRecommendationGroups([[], [small, large], [large]])).toEqual([[large]])+ })+})diff --git a/src/lib/chat-model-minimum.ts b/src/lib/chat-model-minimum.tsnew file mode 100644index 00000000..ae5e17eb--- /dev/null+++ b/src/lib/chat-model-minimum.ts@@ -0,0 +1,15 @@+import type { DiscoverModel } from '../api/model-bundles'++export const SMALL_CHAT_MODEL_WARNING = 'Below 7B: for local loading tests and experiments only. Not recommended for chat or agent work. Choose a model with at least 7B parameters.'++/** Read parameter-count tags, never file sizes or MoE active-parameter counts. */+export function isBelowChatMinimum(model: Pick<DiscoverModel, 'tags'>): boolean {+ return model.tags.some(tag => {+ const match = /^(\d+(?:\.\d+)?)B$/i.exec(tag.trim())+ return match !== null && Number(match[1]) > 0 && Number(match[1]) < 7+ })+}++export function chatRecommendationGroups(groups: DiscoverModel[][]): DiscoverModel[][] {+ return groups.filter(group => group.length > 0 && group.every(model => !isBelowChatMinimum(model)))+}