Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.
C++
Read pictures is on unless the person turned it off: an installed model with no saved choice starts checked
Niko1221a1788c54bee1
diff --git a/apps/host/server/native-control.mjs b/apps/host/server/native-control.mjsindex 19fc1bb3f..ebfb9bd63 100644--- a/apps/host/server/native-control.mjs+++ b/apps/host/server/native-control.mjs@@ -67,7 +67,7 @@ export function createNativeControl({directory,requests=()=>[],changed=()=>{},spfor(const name of names){const path=join(dir,name),config=readJson(path,null);if(!config||typeof config!=='object')continue;const next={...config,...(config.cwd!==undefined?{cwd:fix(config.cwd)}:{}),...(Array.isArray(config.args)?{args:config.args.map(fix)}:{})};if(JSON.stringify(next)!==JSON.stringify(config)){try{writeModelConfig(path,next);}catch{/* read-only folder: the load reports it */}}}}- function installedInfo(info){if(!info)return info;return {...info,models:(info.models??[]).map(entry=>{const cfg=/^strata-[a-z0-9_-]+\.json$/i.test(entry.config??'')?readJson(entry.configPath??join(repo(),entry.config)):{};const at=cfg.args?.indexOf('--native')??-1,nativeFile=at>=0?cfg.args[at+1]:null;const dataFolder=typeof nativeFile==='string'&&basename(dirname(dirname(nativeFile)))==='models'?dirname(dirname(dirname(nativeFile))):info.data_folder;return {...entry,diskGb:entry.diskGb??entry.disk_gb,diskBytes:entry.diskBytes??entry.disk_bytes,sharedBytes:entry.sharedBytes??entry.shared_bytes,removableGb:entry.removableGb??entry.removable_gb,dataFolder,visionPrepared:!!cfg.vision,visionEnabled:cfg.ui_vision_enabled??[...instances.values()].some(i=>i.model===entry.model&&i.status==='ready'&&i.vision),visionDevice:cfg.ui_vision_device,resourceProfile:cfg.ui_resource_profile,lowRamMode:cfg.args?.includes('--resident-experts')?'resident':cfg.args?.includes('--mmap-experts')?'mmap':'auto'};})};}+ function installedInfo(info){if(!info)return info;return {...info,models:(info.models??[]).map(entry=>{const cfg=/^strata-[a-z0-9_-]+\.json$/i.test(entry.config??'')?readJson(entry.configPath??join(repo(),entry.config)):{};const at=cfg.args?.indexOf('--native')??-1,nativeFile=at>=0?cfg.args[at+1]:null;const dataFolder=typeof nativeFile==='string'&&basename(dirname(dirname(nativeFile)))==='models'?dirname(dirname(dirname(nativeFile))):info.data_folder;return {...entry,diskGb:entry.diskGb??entry.disk_gb,diskBytes:entry.diskBytes??entry.disk_bytes,sharedBytes:entry.sharedBytes??entry.shared_bytes,removableGb:entry.removableGb??entry.removable_gb,dataFolder,visionPrepared:!!cfg.vision,/* Picture reading is ON unless the person turned it off: no saved choice and not loaded is undefined, not false (owner rule: pictures on by default). */visionEnabled:cfg.ui_vision_enabled??(()=>{const running=[...instances.values()].find(i=>i.model===entry.model&&i.status==='ready');return running?!!running.vision:undefined;})(),visionDevice:cfg.ui_vision_device,resourceProfile:cfg.ui_resource_profile,lowRamMode:cfg.args?.includes('--resident-experts')?'resident':cfg.args?.includes('--mmap-experts')?'mmap':'auto'};})};}function installRoot(){const found=[preferences.installDir].find(d=>d&&existsSync(d));if(found)return realpathSync(found);mkdirSync(defaultInstall(),{recursive:true});return realpathSync(defaultInstall());}function repo(){if(packaged)return installRoot();const path=realpathSync(preferences.repo);if(!existsSync(join(path,'setup.py'))||!existsSync(join(path,'tools/strata_mcp.py'))||!existsSync(join(path,'serve/server.py')))throw new Error('Choose the Strata repository folder containing setup.py and tools/strata_mcp.py.');return path;}function python(){return resolvePython({repo:preferences.repo});}diff --git a/apps/host/src/components/NativeModels.tsx b/apps/host/src/components/NativeModels.tsxindex 42ef8c09d..255393e11 100644--- a/apps/host/src/components/NativeModels.tsx+++ b/apps/host/src/components/NativeModels.tsx@@ -120,7 +120,8 @@ export function NativeModels({ onOtherModels, onReady, onImport, onConnectEngineif (installed) {if (installed.context)setContext(installed.context);- setVision(installed.visionEnabled === false || installed.images === 'off' ? 'no' : installed.visionDevice ?? installed.images ?? 'yes');+ // Off only when the person turned it off (a saved choice); a model prepared without the picture files (images 'off') still starts with it ON.+ setVision(installed.visionEnabled === false ? 'no' : installed.visionDevice ?? (installed.images && installed.images !== 'off' ? installed.images : 'yes'));setKv(installed.kv ?? 'int8');setLowRam(installed.lowRamMode ?? 'auto');// A model never tuned has no saved choice: keep the page's own (Leave 20%) rather than flipping to Full performance.diff --git a/apps/host/tests/qa1-downloads.test.mjs b/apps/host/tests/qa1-downloads.test.mjsindex 9938d6150..3e03ed1eb 100644--- a/apps/host/tests/qa1-downloads.test.mjs+++ b/apps/host/tests/qa1-downloads.test.mjs@@ -1,4 +1,5 @@import test from 'node:test';+import { readFileSync as readSource } from 'node:fs';import assert from 'node:assert/strict';import { build } from 'esbuild';import { createEngineStep } from '../server/engine-step.mjs';@@ -123,3 +124,26 @@ test('the three NVFP4 versions have clear names and one line that tells them apa}lib.setTranslationLanguage('en');});++test('4d: picture reading is on unless the person turned it off (no saved choice is not "off")', async () => {+ const { nativeFixture } = await import('./helpers/native-fixture.mjs');+ const { readFileSync, writeFileSync } = await import('node:fs');+ const { join } = await import('node:path');+ const f = nativeFixture();+ try {+ await f.control.refresh(true);+ const first = () => f.control.state().installed.models.find(m => m.model === 'iq2_xs');+ assert.equal(first().visionEnabled, undefined, 'a model never loaded and never turned off');+ const path = join(f.repo, 'strata-iq2_xs.json');+ const cfg = JSON.parse(readFileSync(path, 'utf8'));+ writeFileSync(path, JSON.stringify({ ...cfg, ui_vision_enabled: false }));+ await f.control.refresh(true);+ assert.equal(first().visionEnabled, false, 'turned off by the person: stays off');+ writeFileSync(path, JSON.stringify({ ...cfg, ui_vision_enabled: true, ui_vision_device: 'cpu' }));+ await f.control.refresh(true);+ assert.equal(first().visionEnabled, true);+ } finally { await f.cleanup(); }+ const screen = readSource(new URL('../src/components/NativeModels.tsx', import.meta.url), 'utf8');+ assert.match(screen, /setVision\(installed\.visionEnabled === false \? 'no'/);+ assert.match(screen, /else\s+setVision\('yes'\)/, 'a version that is not downloaded starts with Read pictures on');+});