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
feat(onboarding): Qwen 3.5 9B als zweites Modell in der Ersteinrichtung
purple4a6bb8621aa6
diff --git a/src/components/onboarding/ModelsStep.tsx b/src/components/onboarding/ModelsStep.tsxindex 2971b384..add9348c 100644--- a/src/components/onboarding/ModelsStep.tsx+++ b/src/components/onboarding/ModelsStep.tsx@@ -30,7 +30,7 @@*/import { useState, useEffect } from 'react'import { Check, Download, ChevronRight } from 'lucide-react'-import { ONBOARDING_MODELS } from '../../lib/constants'+import { ONBOARDING_MODELS, recommendedOnboardingModelName } from '../../lib/constants'import { useSettingsStore } from '../../stores/settingsStore'import { useProviderStore } from '../../stores/providerStore'import { useDownloadStore } from '../../stores/downloadStore'@@ -336,6 +336,11 @@ export function ModelsStep({ skin, scan, fleet, step, setStep, pulledModels, set// Trennlinie zwischen „welches ist gut?" und „welches willst du?".const showRecommendedBadge = existingModelCount === 0+ // Which entry the badge sits on: the hardware-aware pick, or the static+ // fallback when VRAM is unknown / fits nothing. See+ // `recommendedOnboardingModelName` for the reused threshold.+ const recommendedModelName = recommendedOnboardingModelName(ONBOARDING_MODELS, systemVRAM)+// Die Wahl steht NICHT hier. Sie steht dort, wo der Chat sie liest, in// `modelStore.activeModel`, derselben Stelle, die der Modellknopf des// Composers zeigt und aus der der naechste Sendeweg sein Modell nimmt.@@ -517,7 +522,7 @@ export function ModelsStep({ skin, scan, fleet, step, setStep, pulledModels, set<div><div className="flex items-center gap-1.5"><span className="font-medium text-[0.7rem]">{model.label}</span>- {model.recommended && showRecommendedBadge && (+ {model.name === recommendedModelName && showRecommendedBadge && (<span className={`text-[0.5rem] px-1 py-0.5 rounded ${isDark ? 'bg-white/10 text-gray-300' : 'bg-gray-200 text-gray-600'}`}>Recommended</span>diff --git a/src/lib/__tests__/onboarding-chat-minimum.test.ts b/src/lib/__tests__/onboarding-chat-minimum.test.tsindex 0d504862..d05d404d 100644--- a/src/lib/__tests__/onboarding-chat-minimum.test.ts+++ b/src/lib/__tests__/onboarding-chat-minimum.test.ts@@ -3,14 +3,42 @@ import { ONBOARDING_MODELS } from '../constants'import { getMainstreamTextModels } from '../../api/discover'it('uses an existing catalog model meeting the 7B minimum with exact download integrity', () => {- expect(ONBOARDING_MODELS).toHaveLength(1)- const starter = ONBOARDING_MODELS[0]- const catalog = getMainstreamTextModels().find(model => model.filename === starter.filename)+ const starter = ONBOARDING_MODELS.find(m => m.name === 'qwen2.5-7b')+ expect(starter).toBeDefined()+ const catalog = getMainstreamTextModels().find(model => model.filename === starter!.filename)expect(catalog).toBeDefined()expect(catalog!.tags).toContain('7B')- expect(starter.downloadUrl).toBe(catalog!.downloadUrl)- expect(starter.expectedBytes).toBe(4683074240)- expect(starter.sha256).toBe('65b8fcd92af6b4fefa935c625d1ac27ea29dcb6ee14589c55a8f115ceaaa1423')- expect(Math.round(starter.sizeGB * 1_073_741_824)).toBe(starter.expectedBytes)- expect(starter.description).not.toMatch(/runs on anything|instant|30 seconds/i)+ expect(starter!.downloadUrl).toBe(catalog!.downloadUrl)+ expect(starter!.expectedBytes).toBe(4683074240)+ expect(starter!.sha256).toBe('65b8fcd92af6b4fefa935c625d1ac27ea29dcb6ee14589c55a8f115ceaaa1423')+ expect(Math.round(starter!.sizeGB * 1_073_741_824)).toBe(starter!.expectedBytes)+ expect(starter!.description).not.toMatch(/runs on anything|instant|30 seconds/i)+})++// Second onboarding pick, added so the wizard offers an agent-capable model+// above the 9B floor getRecommendedAgentModels() names as where tool calls+// start holding together. One source of truth: repo and filename come from+// the Discover catalog entry (api/discover.ts, getMainstreamTextModels,+// name 'Qwen 3.5 9B'), not typed twice.+it('the second onboarding pick matches the Discover catalog entry it is drawn from', () => {+ const nineB = ONBOARDING_MODELS.find(m => m.name === 'qwen3.5-9b')+ expect(nineB).toBeDefined()+ const catalog = getMainstreamTextModels().find(model => model.name === 'Qwen 3.5 9B')+ expect(catalog).toBeDefined()+ expect(nineB!.downloadUrl).toBe(catalog!.downloadUrl)+ expect(nineB!.filename).toBe(catalog!.filename)+ expect(nineB!.sizeGB).toBe(catalog!.sizeGB)+ expect(catalog!.tags).toContain('9B')+ expect(catalog!.agent).toBe(true)+ expect(nineB!.agent).toBe(true)+ // Not the badge: the badge follows hardware, this field is the display flag+ // the Discover page filters on (ModelTiles.tsx).+ expect(nineB!.vramGB).toBe(8)+})++it('both onboarding entries are present and distinct', () => {+ expect(ONBOARDING_MODELS.length).toBeGreaterThanOrEqual(2)+ const names = ONBOARDING_MODELS.map(m => m.name)+ expect(names).toContain('qwen2.5-7b')+ expect(names).toContain('qwen3.5-9b')})diff --git a/src/lib/__tests__/onboarding-hardware-recommendation.test.ts b/src/lib/__tests__/onboarding-hardware-recommendation.test.tsnew file mode 100644index 00000000..267b475a--- /dev/null+++ b/src/lib/__tests__/onboarding-hardware-recommendation.test.ts@@ -0,0 +1,51 @@+/**+ * Auftrag: Qwen 3.5 9B in ONBOARDING_MODELS. Die Empfehlung soll auf+ * Hardware, die 9B traegt, auf 9B wechseln, sonst beim 7B-Starter bleiben.+ *+ * Wiederverwendet ist die Schwelle, die es in ModelsStep.tsx schon gibt:+ * `systemVRAM >= model.vramGB`, dieselbe Zahl, die dort die "may not+ * fit"-Warnung treibt. Keine neue Schwelle, nur derselbe Vergleich an einer+ * zweiten Stelle gelesen.+ *+ * Lauf: npx vitest run src/lib/__tests__/onboarding-hardware-recommendation.test.ts+ */+import { describe, it, expect } from 'vitest'+import { ONBOARDING_MODELS, recommendedOnboardingModelName } from '../constants'++describe('recommendedOnboardingModelName', () => {+ const SIEBEN_B = 'qwen2.5-7b'+ const NEUN_B = 'qwen3.5-9b'++ it('unbekannte Hardware (null) laesst den statisch markierten 7B-Starter stehen', () => {+ expect(recommendedOnboardingModelName(ONBOARDING_MODELS, null)).toBe(SIEBEN_B)+ })++ it('eine RTX 3060 mit 12 GB, die Hardware aus dem Auftrag, empfiehlt 9B', () => {+ expect(recommendedOnboardingModelName(ONBOARDING_MODELS, 12)).toBe(NEUN_B)+ })++ it('genau die 8 GB, die 9B selbst verlangt, empfehlen bereits 9B', () => {+ expect(recommendedOnboardingModelName(ONBOARDING_MODELS, 8)).toBe(NEUN_B)+ })++ // Negativkontrolle mit Zahlen: 7 GB traegt den 7B-Starter (Bedarf 6),+ // aber nicht 9B (Bedarf 8). Ohne diese Zeile koennte eine Funktion, die+ // immer NEUN_B zurueckgibt, die 12-GB- und die 8-GB-Zusicherung auch+ // bestehen.+ it('7 GB traegt den 7B-Starter, aber nicht 9B, und empfiehlt darum 7B', () => {+ expect(recommendedOnboardingModelName(ONBOARDING_MODELS, 7)).toBe(SIEBEN_B)+ })++ it('0 GB (Sonde fehlgeschlagen, aber nicht null) traegt keinen der beiden und faellt auf 7B zurueck', () => {+ expect(recommendedOnboardingModelName(ONBOARDING_MODELS, 0)).toBe(SIEBEN_B)+ })++ it('knapp unter dem 7B-Bedarf traegt keinen der beiden und faellt auf 7B zurueck', () => {+ expect(recommendedOnboardingModelName(ONBOARDING_MODELS, 5)).toBe(SIEBEN_B)+ })++ it('eine Liste ohne statisch Empfohlenes und ohne tragende Hardware liefert undefined', () => {+ const ohneEmpfehlung = ONBOARDING_MODELS.map(m => ({ ...m, recommended: false }))+ expect(recommendedOnboardingModelName(ohneEmpfehlung, 0)).toBeUndefined()+ })+})diff --git a/src/lib/constants.ts b/src/lib/constants.tsindex 6765d341..e8b28ecd 100644--- a/src/lib/constants.ts+++ b/src/lib/constants.ts@@ -380,5 +380,44 @@ export const ONBOARDING_EMBED_MODEL = {export const ONBOARDING_MODELS: OnboardingModel[] = [// One chat starter meeting the 7B minimum. Download integrity comes from// the published LFS metadata, not the rounded display size.+ //+ // agent: false is deliberate, not a stale flag. qwen2.5 sits in+ // AGENT_COMPATIBLE (model-compatibility.ts), so the wire format works, but+ // getRecommendedAgentModels() carries its own verdict on this: "Nothing+ // under 9B is recommended to run locally: the small ones lose the thread+ // on the second tool call." The flag here is the same curation call, not+ // the wire-format check, so it stays false at 7B.{ name: 'qwen2.5-7b', label: 'Qwen 2.5 7B (Starter)', description: '7B chat model, Q4_K_M. Allow additional memory for context and the operating system. Download time and response speed depend on your hardware.', size: '4.4 GiB', vram: 'about 6 GB for GPU offload, context-dependent', vramGB: 6, recommended: true, agent: false, downloadUrl: HF_OB('bartowski/Qwen2.5-7B-Instruct-GGUF', 'Qwen2.5-7B-Instruct-Q4_K_M.gguf'), filename: 'Qwen2.5-7B-Instruct-Q4_K_M.gguf', sizeGB: 4683074240 / 1_073_741_824, expectedBytes: 4683074240, sha256: '65b8fcd92af6b4fefa935c625d1ac27ea29dcb6ee14589c55a8f115ceaaa1423' },+ // Second onboarding pick, above the 9B floor the same verdict names as the+ // point where tool calls start holding together. Same repo/filename as the+ // Discover catalog entry (api/discover.ts, getMainstreamTextModels, name+ // 'Qwen 3.5 9B'); src/lib/__tests__/onboarding-chat-minimum.test.ts pins+ // the two together so they cannot drift apart.+ { name: 'qwen3.5-9b', label: 'Qwen 3.5 9B', description: 'Better for agents and tools, needs about 8 GB VRAM.', size: '~5 GB', vram: 'about 8 GB for GPU offload, context-dependent', vramGB: 8, agent: true, downloadUrl: HF_OB('unsloth/Qwen3.5-9B-GGUF', 'Qwen3.5-9B-Q4_K_M.gguf'), filename: 'Qwen3.5-9B-Q4_K_M.gguf', sizeGB: 5 },]++/**+ * Which onboarding model gets the "Recommended" badge, given the detected+ * VRAM (or null when it couldn't be probed).+ *+ * Reuses the one hardware comparison that already exists on this screen.+ * ModelsStep.tsx compares `systemVRAM` against `model.vramGB` to decide+ * whether to show the "Full GPU offload may not fit" advisory. No new+ * threshold: a model "fits" the same way it already does for that warning.+ * Among the models the hardware fits, the one asking for the most VRAM wins+ * the badge (the strongest one it can actually carry). When VRAM is unknown+ * or fits none of them, the badge stays on whichever entry is statically+ * marked `recommended`.+ */+export function recommendedOnboardingModelName(+ models: OnboardingModel[],+ systemVramGb: number | null,+): string | undefined {+ if (systemVramGb !== null) {+ const capable = models.filter((m) => systemVramGb >= m.vramGB)+ if (capable.length > 0) {+ return capable.reduce((best, m) => (m.vramGB > best.vramGB ? m : best)).name+ }+ }+ return models.find((m) => m.recommended)?.name+}