Skip to content

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++

Gyro: the minimum engine is 0.1.45.1, not 0.1.45; the app says 'needs a newer engine' with the update step

Niko1221d631ed2da783
diff --git a/apps/host/server/engine-version.mjs b/apps/host/server/engine-version.mjs
new file mode 100644
index 000000000..c58bbd089
--- /dev/null
+++ b/apps/host/server/engine-version.mjs
@@ -0,0 +1,35 @@
+/**
+ * Does the installed engine read a model's files? The catalog (tools/strata_mcp.py, from setup.py's MODELS) names the first engine
+ * that does (`engine_min`, e.g. Gyro: 0.1.45.1, because its expert files are native_experts v5 and the released 0.1.45 stops at v4).
+ * An older engine would start the download and then fail on the files, so the app says "needs a newer engine" first.
+ */
+export function parseEngineVersion(value) {
+ const m = /^\s*v?(\d+(?:\.\d+){0,3})/.exec(String(value ?? ''));
+ return m ? m[1].split('.').map(Number) : null;
+}
+
+/** True when `installed` is known and older than `minimum`. An engine built from this checkout ('local') or one whose version cannot be read is never called too old. */
+export function engineTooOld(installed, minimum, source = null) {
+ if (!minimum || source === 'local') return false;
+ const have = parseEngineVersion(installed), need = parseEngineVersion(minimum);
+ if (!have || !need) return false;
+ for (let i = 0; i < 4; i++) {
+ const a = have[i] ?? 0, b = need[i] ?? 0;
+ if (a !== b) return a < b;
+ }
+ return false;
+}
+
+/** The catalog with `needsNewerEngine` on every size the installed engine cannot read. */
+export function markEngine(catalog, engine) {
+ if (!catalog || !Array.isArray(catalog.families)) return catalog;
+ const version = engine?.version ?? null, source = engine?.source ?? null;
+ return { ...catalog, families: catalog.families.map(f => ({ ...f, sizes: (f.sizes ?? []).map(s => ({ ...s, needsNewerEngine: engineTooOld(version, s.engine_min, source) })) })) };
+}
+
+/** The plain sentence for a refused install or load, or null when the engine is new enough. */
+export function engineRefusal(catalog, modelId, engine) {
+ const size = catalog?.families?.flatMap(f => f.sizes ?? []).find(s => s.id === modelId);
+ if (!size?.needsNewerEngine) return null;
+ return `This model needs a newer engine: ${size.model} needs engine ${size.engine_min} or newer, and this one is ${engine?.version}. Update the engine in Settings, then try again.`;
+}
diff --git a/apps/host/server/native-control.mjs b/apps/host/server/native-control.mjs
index b89315cd6..6993d6278 100644
--- a/apps/host/server/native-control.mjs
+++ b/apps/host/server/native-control.mjs
@@ -17,6 +17,7 @@ import { createAutoTune, writeTuneConfig } from './native-autotune.mjs';
import { plainError, PHASE_TEXT } from './update-messages.mjs';
import { checkRunConfig, describeIssues } from './run-config-check.mjs';
import { openTextFile } from './open-text-file.mjs';
+import { markEngine, engineRefusal } from './engine-version.mjs';
const ROOT=resolve(dirname(fileURLToPath(import.meta.url)),'..');
const safeId=value=>typeof value==='string'&&/^[a-z0-9_-]{1,80}$/i.test(value);
@@ -113,7 +114,7 @@ export function createNativeControl({directory,requests=()=>[],changed=()=>{},sp
/* A read that is not forced never makes the window wait for the (slow) status of Control: it gets the last state at once, and a stale one
is refreshed in the background. Only the first read, and a forced one after an operation, waits. */
if(refreshing)return !force&&snapshot.available?state():refreshing;if(!force&&Date.now()-lastRead<45000)return state();
- refreshing=(async()=>{try{const [catalog,status]=packaged?await (async()=>{const s=await tool('strata_status',{hardware:true});const c=await tool('strata_models').catch(error=>({families:[],contexts:[],recommendation:{family:null,model:null},context_note:'',error:error.message}));return [c,s];})():await Promise.all([tool('strata_models'),tool('strata_status',{hardware:true})]);let visionReader=false;if(packaged){try{const e=await control.engine();const root=e?.engine?.root??(e?.engine?.exe?dirname(e.engine.exe):'');visionReader=!!root&&['strata-vision','strata-vision.exe'].some(n=>existsSync(join(root,n)));}catch{visionReader=false;}}const markImages=c=>c&&Array.isArray(c.families)?{...c,families:c.families.map(f=>({...f,imagesCapable:!!f.images,images:!!f.images&&visionReader,sizes:(f.sizes??[]).map(s=>({...s,imagesCapable:!!s.images,images:!!s.images&&visionReader}))}))}:c;snapshot={available:true,repo:packaged?status.installDir:repo(),version:packaged?(control.version??null):await execute('git',['describe','--tags','--always'],repo()).then(s=>s.trim()).catch(()=>null),summary:status.summary,catalog:packaged?markImages(catalog):catalog,visionReader:packaged?visionReader:true,installed:installedInfo(status.installed),hardware:status.hardware,error:null,install:status.install,external:status.running??null,...(packaged?{packaged:true,installDir:status.installDir,engine:status.engine,installerError:status.installerError}:{})};lastRead=Date.now();if(status.install?.running&&![...jobs.values()].some(j=>j.state==='running'))begin('install',j=>watchInstall(j,status.install));}catch(error){snapshot={...snapshot,available:false,error:error.message};lastRead=Date.now();}emit();return state();})().finally(()=>{refreshing=null;});const run=refreshing;if(!force&&snapshot.available){run.catch(()=>{});return state();}return run;
+ refreshing=(async()=>{try{const [catalog,status]=packaged?await (async()=>{const s=await tool('strata_status',{hardware:true});const c=await tool('strata_models').catch(error=>({families:[],contexts:[],recommendation:{family:null,model:null},context_note:'',error:error.message}));return [c,s];})():await Promise.all([tool('strata_models'),tool('strata_status',{hardware:true})]);let visionReader=false;if(packaged){try{const e=await control.engine();const root=e?.engine?.root??(e?.engine?.exe?dirname(e.engine.exe):'');visionReader=!!root&&['strata-vision','strata-vision.exe'].some(n=>existsSync(join(root,n)));}catch{visionReader=false;}}const markImages=c=>c&&Array.isArray(c.families)?{...c,families:c.families.map(f=>({...f,imagesCapable:!!f.images,images:!!f.images&&visionReader,sizes:(f.sizes??[]).map(s=>({...s,imagesCapable:!!s.images,images:!!s.images&&visionReader}))}))}:c;snapshot={available:true,repo:packaged?status.installDir:repo(),version:packaged?(control.version??null):await execute('git',['describe','--tags','--always'],repo()).then(s=>s.trim()).catch(()=>null),summary:status.summary,catalog:markEngine(packaged?markImages(catalog):catalog,status.engine),engineInfo:{version:status.engine?.version??null,source:status.engine?.source??null},visionReader:packaged?visionReader:true,installed:installedInfo(status.installed),hardware:status.hardware,error:null,install:status.install,external:status.running??null,...(packaged?{packaged:true,installDir:status.installDir,engine:status.engine,installerError:status.installerError}:{})};lastRead=Date.now();if(status.install?.running&&![...jobs.values()].some(j=>j.state==='running'))begin('install',j=>watchInstall(j,status.install));}catch(error){snapshot={...snapshot,available:false,error:error.message};lastRead=Date.now();}emit();return state();})().finally(()=>{refreshing=null;});const run=refreshing;if(!force&&snapshot.available){run.catch(()=>{});return state();}return run;
}
function configure({repository}){if(packaged){if(instances.size||[...jobs.values()].some(j=>j.state==='running'))throw new Error('Unload models and finish operations before changing the installation.');const next=realpathSync(String(repository));if(!statSync(next).isDirectory())throw new Error('Choose the folder that holds your Strata model configurations.');preferences={...preferences,installDir:next};packagedInstall=null;disconnect();writeFileSync(settingsPath,JSON.stringify(preferences,null,2),{mode:0o600});lastRead=0;return refresh(true);}if(instances.size||[...jobs.values()].some(j=>j.state==='running'))throw new Error('Unload models and finish operations before changing the installation.');const next=realpathSync(String(repository));const old=preferences;preferences={...preferences,repo:next};try{repo();}catch(e){preferences=old;throw e;}disconnect();writeFileSync(settingsPath,JSON.stringify(preferences,null,2),{mode:0o600});lastRead=0;return refresh(true);}
function setDownloadDirectory(input){if([...jobs.values()].some(j=>j.state==='running'))throw new Error('Finish the current operation before changing the folder.');if(typeof input!=='string'||!input.trim()||/[\r\n\0]/.test(input))throw new Error('Choose a model folder.');const path=realpathSync(input.trim());if(!statSync(path).isDirectory())throw new Error('Choose a folder, not a file.');accessSync(path,constants.R_OK|constants.W_OK);preferences={...preferences,downloadDirectory:path};writeFileSync(settingsPath,JSON.stringify(preferences,null,2),{mode:0o600});emit();return state();}
@@ -349,7 +350,7 @@ return {summary:result.summary??'Deleted',removed:result.plan?.gb??null};}
const room=args.resourceProfile==='work';
return autotuner.start(job,job.kind==='recheck'?'recheck':'tune',{configPath:path,presetId:args.presetId,mode:args.mode,use:args.use,goal:room?'room':'speed',leaveRam:room?20:0,allowSmallDifferences:args.allowSmallDifferences===true,name:args.name},{onProgress:p=>{job.summary=p.text??job.summary;emit();}});
}
- function operation(kind,args={}){if(!['install','load','benchmark','tune','autotune','recheck','calibrate','update-engine','update-strata','rollback','remove'].includes(kind))throw new Error('Choose a supported native operation.');if(!snapshot.available)throw new Error(snapshot.error??'Connect the native Strata installation first.');return begin(kind,job=>kind==='install'?install(job,args):kind==='load'?loadEngine(job,args):kind==='benchmark'?benchmark(job,args):kind==='tune'?tune(job,args):kind==='autotune'||kind==='recheck'?autotune(job,args):kind==='remove'?removeModel(job,args):program(job,args),{guided:args.guided===true,model:args.model});}
+ function operation(kind,args={}){if(!['install','load','benchmark','tune','autotune','recheck','calibrate','update-engine','update-strata','rollback','remove'].includes(kind))throw new Error('Choose a supported native operation.');if(!snapshot.available)throw new Error(snapshot.error??'Connect the native Strata installation first.');if(kind==='install'||kind==='load'){const refusal=engineRefusal(snapshot.catalog,args.model,snapshot.engineInfo);if(refusal)throw new Error(refusal);}return begin(kind,job=>kind==='install'?install(job,args):kind==='load'?loadEngine(job,args):kind==='benchmark'?benchmark(job,args):kind==='tune'?tune(job,args):kind==='autotune'||kind==='recheck'?autotune(job,args):kind==='remove'?removeModel(job,args):program(job,args),{guided:args.guided===true,model:args.model});}
async function cancel(id){const job=jobs.get(id);if(!job||job.state!=='running')throw new Error('This operation is no longer running.');if(job.kind==='install'){job.engineAbort?.abort();await tool('strata_install',{cancel:true});}else if(job.abort)job.abort.abort();else if(job.process){if(!['tune','calibrate','autotune','recheck'].includes(job.kind))throw new Error('File updates cannot be cancelled safely while files are being replaced.');job.state='cancelled';await stopProcess(job.process);}job.state='cancelled';job.summary=job.kind==='install'?'Stopped. Completed downloads are kept.':'Stopped.';emit();return state();}
async function close(){closing=true;clearInterval(timer);const installing=packaged&&child&&[...jobs.values()].some(j=>j.kind==='install'&&j.state==='running');if(installing)await send('tools/call',{name:'strata_install',arguments:{cancel:true}},15000).catch(()=>{});const operations=[];for(const job of jobs.values()){job.abort?.abort();if(job.process)operations.push(stopProcess(job.process));if(job.state==='running')job.state='cancelled';}await Promise.all(operations);await Promise.all([...instances.keys()].map(id=>unload(id,true).catch(()=>{})));disconnect();}
// Remove nonserializable process references from public jobs.
diff --git a/apps/host/src/components/GuidedSetup.tsx b/apps/host/src/components/GuidedSetup.tsx
index 4bbe713e6..c7336e0c3 100644
--- a/apps/host/src/components/GuidedSetup.tsx
+++ b/apps/host/src/components/GuidedSetup.tsx
@@ -177,7 +177,7 @@ export function GuidedSetup() {
{tr(step === 2 ? <div className="onboard-model-stage">
{tr(selectedFamily ? <>
<div className="onboard-model-top"><div className="onboard-model-picker"><span className="onboard-control-label">{tr("Model")}</span><div><span className="onboard-model-symbol"><Icon name="models" size={23}/></span><Select ariaLabel={tr("Setup model")} value={selectedFamily.family} options={families.map(f => ({ value: f.family, label: f.title }))} onChange={value => chooseNative(value, '')}/></div></div><div className="onboard-context"><span className="onboard-control-label">{tr("Conversation context")}</span><Select ariaLabel={tr("Setup conversation context")} value={String(context)} options={(native?.catalog?.contexts ?? [32768]).map(n => ({ value: String(n), label: `${n / 1024}K` }))} onChange={value => setContext(Number(value))}/></div></div>
- <OnboardingMemory hardware={hardware} native={native?.hardware}/>{tr(!version ? <p className="small muted">{tr("This model needs a newer engine. Update your engine or import a local GGUF for this model.")}</p> : null)}
+ <OnboardingMemory hardware={hardware} native={native?.hardware}/>{tr(!version || version.needsNewerEngine ? <p className="small muted">{tr("This model needs a newer engine. Update your engine or import a local GGUF for this model.")}</p> : null)}
<div className="onboard-version-heading"><strong>{tr("Choose a version")}</strong><span>{tr(version ? `${catalogVersionLabel(version)} selected` : '')}</span></div>
<div className="onboard-versions" role="radiogroup" aria-label={tr("Model version")} onKeyDown={radioKeys}>{tr(selectedFamily.sizes.map(v => <button key={v.id} type="button" role="radio" tabIndex={version?.id === v.id ? 0 : -1} aria-checked={version?.id === v.id} data-selected={version?.id === v.id} onClick={() => { setSize(v.id); setPlan(null); }}><span className="onboard-version-top"><span className="onboard-version-copy"><strong>{tr(catalogVersionLabel(v))}</strong><small>{tr(v.model)}</small></span><span className="onboard-version-radio">{tr(version?.id === v.id ? <Icon name="check" size={12}/> : null)}</span></span><span className="onboard-version-bottom"><span className="onboard-version-size"><Icon name="download" size={15}/>{tr(v.download_gb.toFixed(1))} <small>{tr("GB")}</small></span><span className="onboard-version-fit">{tr(v.on_this_pc === 'does not fit' || v.on_this_pc === 'tight' || v.on_this_pc?.includes('slower') || v.on_this_pc?.startsWith('experimental:') ? <><Icon name="clock" size={13}/>{tr("May run slower")}</> : v.installed ? <><Icon name="check" size={13}/>{tr("On this computer")}</> : <>{tr("Download size")}</>)}</span></span></button>))}</div>
<div className="onboard-folder"><Icon name="folder" size={20}/><div><strong>{tr(directory ? 'Your model folder' : 'Already downloaded the model?')}</strong><small>{tr(directory || "Choose the folder and we'll start your models with Strata.")}</small></div><Btn size="sm" onClick={() => setFolderOpen(v => !v)}>{tr(folderOpen ? 'Close' : directory ? 'Change' : 'Choose folder')}</Btn></div>
@@ -198,7 +198,7 @@ export function GuidedSetup() {
{tr(tuneJob && ['error', 'cancelled'].includes(tuneJob.state) ? <ErrorNotice message={tuneJob.error ?? 'Tuning stopped. Your model files are safe.'} next={tr("Try again, or turn off the longer measurement above.")}/> : null)}
</>)}
</div>)}
- <footer className="onboard-footer"><Btn variant="ghost" disabled={pending || !!active} onClick={() => void perform(() => advance(step === 4 ? 2 : step - 1))}>{tr("Back")}</Btn>{tr(step === 3 ? <span>{tr(preparing ? 'Take a look around while we prepare.' : 'Downloads start only when you’re ready.')}</span> : step === 4 && tuneJob?.state === 'running' ? <span>{tr("We\u2019ll open chat when your model is ready.")}</span> : null)}{tr(step === 2 ? <Btn variant="primary" disabled={pending || !!active || !version || !native?.available || folderOpen} onClick={() => void review()}>{tr(pending ? 'Checking…' : 'Continue')}<Icon name="chevron" size={15}/></Btn> : step === 3 ? <Btn variant="primary" disabled={pending || checkingPlan || !!active || !!plan?.plan?.disk_short || !version} onClick={() => void download()}>{tr(preparing ? 'Preparing…' : checkingPlan ? 'Checking storage…' : pending ? 'Starting…' : stopped ? 'Resume download' : 'Download model')}{tr(!preparing ? <Icon name="download" size={16}/> : null)}</Btn> : <Btn variant="primary" disabled={pending || !!active || !installed?.ready} onClick={() => void tune()}>{tr(tuneJob?.state === 'running' ? 'Tuning…' : pending ? 'Starting…' : 'Tune & start chatting')}<Icon name="chevron" size={15}/></Btn>)}</footer>
+ <footer className="onboard-footer"><Btn variant="ghost" disabled={pending || !!active} onClick={() => void perform(() => advance(step === 4 ? 2 : step - 1))}>{tr("Back")}</Btn>{tr(step === 3 ? <span>{tr(preparing ? 'Take a look around while we prepare.' : 'Downloads start only when you’re ready.')}</span> : step === 4 && tuneJob?.state === 'running' ? <span>{tr("We\u2019ll open chat when your model is ready.")}</span> : null)}{tr(step === 2 ? <Btn variant="primary" disabled={pending || !!active || !version || !!version.needsNewerEngine || !native?.available || folderOpen} onClick={() => void review()}>{tr(pending ? 'Checking…' : 'Continue')}<Icon name="chevron" size={15}/></Btn> : step === 3 ? <Btn variant="primary" disabled={pending || checkingPlan || !!active || !!plan?.plan?.disk_short || !version || !!version.needsNewerEngine} onClick={() => void download()}>{tr(preparing ? 'Preparing…' : checkingPlan ? 'Checking storage…' : pending ? 'Starting…' : stopped ? 'Resume download' : 'Download model')}{tr(!preparing ? <Icon name="download" size={16}/> : null)}</Btn> : <Btn variant="primary" disabled={pending || !!active || !installed?.ready} onClick={() => void tune()}>{tr(tuneJob?.state === 'running' ? 'Tuning…' : pending ? 'Starting…' : 'Tune & start chatting')}<Icon name="chevron" size={15}/></Btn>)}</footer>
{tr(step === 4 && ready && ['error', 'cancelled'].includes(tuneJob?.state ?? '') ? <button className="onboard-continue-anyway" onClick={() => void finish()}>{tr("Continue to chat without a speed result")}</button> : null)}
</>)}
{tr(error ? <div className="onboard-error"><OnboardingError message={error} onFolder={changeDownloadFolder}/></div> : null)}
diff --git a/apps/host/src/components/NativeModels.tsx b/apps/host/src/components/NativeModels.tsx
index 345f7cdb7..9c2c7ce0c 100644
--- a/apps/host/src/components/NativeModels.tsx
+++ b/apps/host/src/components/NativeModels.tsx
@@ -125,7 +125,7 @@ export function NativeModels({ onOtherModels, onReady, onImport, onConnectEngine
<div className="native-model-layout native-model-layout--fit">
<div className="stack">
{tr(native?.instances.length && expert ? <section className="st-card native-running"><h2 className="h4">{tr(native.instances.length === 1 ? 'Loaded model' : 'Loaded models')}</h2>{tr(native.instances.map(i => <div key={i.id}><span><strong>{tr(i.label)}</strong><small>{tr(i.gpus.length ? i.gpus.map(g => `GPU ${g + 1}`).join(' + ') : 'Automatic GPU')} · {tr(i.status === 'ready' ? i.phase : i.status)}{tr(native.defaultId === i.id ? ' · Chat default' : '')}</small>{tr(i.error ? <small className="inline-error">{tr(plainFailureText(i.error).message)}</small> : null)}</span>{tr(expert && multiple && native.defaultId !== i.id ? <Btn size="sm" variant="ghost" onClick={() => void perform(() => nativeAction(`instances/${i.id}/default`))}>{tr("Use in chat")}</Btn> : null)}<Btn size="sm" disabled={pending || !!active} onClick={() => void perform(() => nativeAction(`instances/${i.id}/unload`))}>{tr("Unload")}</Btn></div>))}</section> : null)}
- <section className="st-card native-choice">{tr(selectedFamily && !selectedSize ? <><h2 className="h3">{tr("This model needs a newer engine.")}</h2><p className="small muted">{tr("Update your engine or import a local GGUF for this model.")}</p><Btn onClick={() => { setSettingsSection('Engine'); go('settings'); }}>{tr("Update engine")}</Btn><Btn variant="ghost" onClick={onImport ?? onOtherModels}>{tr("Use a local GGUF\u2026")}</Btn></> : null)}{tr(!selectedFamily ? <><h2 className="h3">{tr("Set up Strata")}</h2><p className="small muted">{tr("Connect your local installation to choose an optimized model.")}</p><Btn variant="primary" onClick={onConnectEngine ?? (() => { setSettingsSection('Engine'); go('settings'); })}>{tr("Connect engine")}</Btn>{tr(native?.error ? <p className="small inline-error">{tr(native.error)}</p> : null)}<Btn variant="ghost" onClick={onOtherModels}>{tr("Other local models")}</Btn></> : null)}
+ <section className="st-card native-choice">{tr(selectedFamily && (!selectedSize || selectedSize.needsNewerEngine) ? <><h2 className="h3">{tr("This model needs a newer engine.")}</h2><p className="small muted">{tr("Update your engine or import a local GGUF for this model.")}</p><Btn onClick={() => { setSettingsSection('Engine'); go('settings'); }}>{tr("Update engine")}</Btn><Btn variant="ghost" onClick={onImport ?? onOtherModels}>{tr("Use a local GGUF\u2026")}</Btn></> : null)}{tr(!selectedFamily ? <><h2 className="h3">{tr("Set up Strata")}</h2><p className="small muted">{tr("Connect your local installation to choose an optimized model.")}</p><Btn variant="primary" onClick={onConnectEngine ?? (() => { setSettingsSection('Engine'); go('settings'); })}>{tr("Connect engine")}</Btn>{tr(native?.error ? <p className="small inline-error">{tr(native.error)}</p> : null)}<Btn variant="ghost" onClick={onOtherModels}>{tr("Other local models")}</Btn></> : null)}
{tr(selectedSize ? <>
<div className="native-choice__head"><span className="native-choice__label">{tr("Version")}</span><span className="native-choice__tools"><NativePresets values={values} onApply={v => { const f = families.find(f => f.family === v.family || f.sizes.some(s => s.sourceFamily === v.family)); if (!f)
return; presetPending.current = true; setFamily(f.family); setSize(f.sizes.find(s => s.model === v.model && (s.sourceFamily === v.family || f.family === v.family))?.id ?? ''); setContext(v.context ?? 32768); setVision(v.vision ?? 'no'); setKv(v.kv ?? 'int8'); setLowRam(v.low_ram ?? 'auto'); }}/><Btn icon="models" onClick={() => setManage(true)}>{tr("Manage models")}</Btn></span></div>
@@ -143,7 +143,7 @@ export function NativeModels({ onOtherModels, onReady, onImport, onConnectEngine
{tr(job?.state === 'error' ? <ErrorNotice message={job.error ?? job.summary} action={tr("Retry")} onRetry={() => void load()}/> : null)}
{tr(error ? <ErrorNotice message={error}/> : null)}
{selectedSize && installed?.ready ? <NativeTuneBadge model={selectedSize.id} resourceProfile={resourceProfile} vision={selectedSize.images ? vision : 'no'}/> : null}
- <div className="native-model-actions">{tr(loadedSelected ? <><Btn disabled={pending || !!active} onClick={() => void perform(() => nativeAction(`instances/${loadedSelected.id}/unload`))}>{tr("Unload")}</Btn>{tr(onReady ? <Btn variant="primary" onClick={onReady}>{tr("Start chatting")}</Btn> : <span className="native-ready">{tr("Ready")}</span>)}</> : onReady && native?.instances.some(i => i.status === 'ready') ? <Btn variant="primary" onClick={onReady}>{tr("Start chatting")}</Btn> : <><Btn icon="gauge" disabled={!installed?.ready || !native?.available || !!active || !selectedSize} onClick={() => setTuneOpen(true)}>{tr("Tune model")}</Btn><Btn variant="primary" icon="models" disabled={pending || !native?.available || !!active || !selectedSize || expert && deviceChoice === 'split' && gpus.length < 2} onClick={() => void load()}>{tr(pending ? 'Checking…' : installed?.ready ? 'Load model' : 'Download & load')}</Btn></>)}</div>
+ <div className="native-model-actions">{tr(loadedSelected ? <><Btn disabled={pending || !!active} onClick={() => void perform(() => nativeAction(`instances/${loadedSelected.id}/unload`))}>{tr("Unload")}</Btn>{tr(onReady ? <Btn variant="primary" onClick={onReady}>{tr("Start chatting")}</Btn> : <span className="native-ready">{tr("Ready")}</span>)}</> : onReady && native?.instances.some(i => i.status === 'ready') ? <Btn variant="primary" onClick={onReady}>{tr("Start chatting")}</Btn> : <><Btn icon="gauge" disabled={!installed?.ready || !native?.available || !!active || !selectedSize || selectedSize.needsNewerEngine} onClick={() => setTuneOpen(true)}>{tr("Tune model")}</Btn><Btn variant="primary" icon="models" disabled={pending || !native?.available || !!active || !selectedSize || !!selectedSize.needsNewerEngine || expert && deviceChoice === 'split' && gpus.length < 2} onClick={() => void load()}>{tr(pending ? 'Checking…' : installed?.ready ? 'Load model' : 'Download & load')}</Btn></>)}</div>
</section>
{tr(expert && IMAGE_GENERATION_VISIBLE ? <><details className="native-generation"><summary>{tr("Image generation ")}<span className="muted">{tr("Optional")}</span></summary><RunImageModel library={imageLibrary} disabled={pending || !!active} onChange={() => { }}/></details></> : null)}
{tr(expert ? <section id="native-expert-settings" ref={expertSection} className="st-card native-execution"><h2 className="h4">{tr("Expert settings")}</h2>{tr(tunedNow ? <p className="small muted native-tuned-note">{tr("Showing the values of your tuning '{0}'.", [tunedNow.name])}</p> : null)}<label className="native-toggle"><span><strong>{tr("Run multiple models")}</strong><small>{tr("Loading another model keeps the others loaded.")}</small></span><button className="st-toggle" role="switch" aria-label={tr("Run multiple models")} aria-checked={multiple} onClick={() => setMultiple(v => !v)}/></label><h3 className="small strong">{tr("Run on")}</h3><p className="small muted">{tr("Automatic uses the installation\u2019s GPU placement. Choose a GPU, or split this model across several GPUs.")}</p><Select ariaLabel={tr("Run on")} value={deviceChoice} options={[{ value: 'auto', label: 'Automatic' }, ...(native?.hardware?.gpus ?? []).map(g => ({ value: String(g.index), label: `GPU ${g.index + 1} · ${g.name}` })), ...((native?.hardware?.gpus.length ?? 0) > 1 ? [{ value: 'split', label: 'Split across GPUs…' }] : [])]} onChange={value => { setDeviceChoice(value); setGpus(value === 'auto' ? [] : value === 'split' ? (native?.hardware?.gpus ?? []).map(g => g.index) : [Number(value)]); }}/>{tr(deviceChoice === 'split' ? <div className="native-gpu-options">{tr(native?.hardware?.gpus.map(g => <label key={g.index}><input type="checkbox" checked={gpus.includes(g.index)} onChange={e => setGpus(old => e.target.checked ? [...old, g.index] : old.filter(i => i !== g.index))}/><span>{tr("GPU ")}{tr(g.index + 1)} · {tr(g.name)}<small>{tr(g.vram_gb)}{tr(" GB VRAM")}</small></span></label>))}</div> : null)}{tr(gpus.length > 1 ? <label className="input-field"><span>{tr("Layer split")}</span><input className="st-input" value={split} placeholder={tr("auto or 16,32")} onChange={e => setSplit(e.target.value)}/></label> : null)}<div className="native-field-grid"><label className="input-field"><span>{tr("Context memory")}</span><Select ariaLabel={tr("Native KV format")} value={kv} options={[{ value: 'int8', label: 'INT8' }, { value: 'q4_0', label: 'Q4' }, { value: 'k8v4', label: 'K8 / V4' }]} onChange={setKv}/></label><label className="input-field"><span>{tr("Low-RAM mode")}</span><Select ariaLabel={tr("Native low RAM mode")} value={lowRam} options={['auto', 'resident', 'mmap'].map(v => ({ value: v, label: v === 'auto' ? 'Automatic' : v === 'resident' ? 'Keep experts in RAM' : 'Read experts from disk' }))} onChange={setLowRam}/></label></div>{tr(installed ? <><NativeSettingsFile model={installed.model}/><NativeSettings model={installed.model}/></> : <p className="small muted">{tr("More engine parameters become available after preparing this version.")}</p>)}</section> : null)}
diff --git a/apps/host/src/lib/native.ts b/apps/host/src/lib/native.ts
index c0cc221e4..509bef23b 100644
--- a/apps/host/src/lib/native.ts
+++ b/apps/host/src/lib/native.ts
@@ -3,7 +3,7 @@ import { api } from './client';
import type { Hardware, RuntimeModels } from './types';
export interface GpuChoiceOption {key:string;cards:number[];label:string;verdict:'fits'|'tight'|'spills'|'unknown';words:string;notes:string[];recommended:boolean}
export interface GpuChoice {options:GpuChoiceOption[];recommended:string|null;ignored:{name?:string;why_ignored:string}[];cards:number}
-export interface NativeSize {id:string;model:string;about:string;download_gb:number;ram_needed_gb:number;experts_gb:number;on_this_pc:string|null;installed:boolean;gpu_options?:GpuChoice|null;images?:boolean;imagesCapable?:boolean}
+export interface NativeSize {/** The first engine that reads this size's files (the catalog), and whether the installed engine is older: the screen then says "needs a newer engine" and offers the update. */engine_min?:string|null;needsNewerEngine?:boolean;id:string;model:string;about:string;download_gb:number;ram_needed_gb:number;experts_gb:number;on_this_pc:string|null;installed:boolean;gpu_options?:GpuChoice|null;images?:boolean;imagesCapable?:boolean}
export interface NativeFamily {family:string;title:string;about:string;experimental:boolean;images:boolean;sizes:NativeSize[]}
export interface NativeField {id:string;label:string;group:string;type:'number'|'boolean'|'string'|'enum'|'array';min?:number;max?:number;choices?:string[];hint?:string;supported?:boolean}
export interface NativeJob {id:string;kind:string;guided?:boolean;model?:string;state:'running'|'done'|'error'|'cancelled';startedAt:string;summary:string;error:string|null;details?:string;result:Record<string,any>|null;progress?:Record<string,any>|null}
diff --git a/apps/host/src/lib/plain-errors.ts b/apps/host/src/lib/plain-errors.ts
index 8b2997046..794e034e5 100644
--- a/apps/host/src/lib/plain-errors.ts
+++ b/apps/host/src/lib/plain-errors.ts
@@ -15,6 +15,7 @@ const MEMORY_NEXT = 'Close other programs and try again, or choose “Leave 20%
/** Order matters: the first rule that matches wins. */
const RULES: Rule[] = [
+ { kind: 'engine-too-old', match: /needs a newer engine: .* needs engine/i, message: 'This model needs a newer engine.', next: 'Update the engine (Settings, Engine, Update engine), then try again.' },
{ kind: 'settings-file', match: /settings file for this model has a mistake/i, message: 'Your settings file has a mistake, so the model was not started.', next: 'Open the settings file under Expert settings, fix the line shown under Details, then load the model again.' },
{ kind: 'connector-missing', match: /connector \(cloudflared\) is not installed/i, message: 'Strata could not find Cloudflare’s connector (cloudflared) on this computer.', next: 'Install cloudflared (with your package manager, or from Cloudflare’s website), then press Retry setup. Strata finds it on your PATH and in the usual places.' },
{ kind: 'connector-old', match: /cloudflared at .* is version .* too old/i, message: 'The Cloudflare connector on this computer is too old.', next: 'Update cloudflared to a newer version, then press Retry setup.' },
diff --git a/apps/host/src/locales/de.json b/apps/host/src/locales/de.json
index 0848bcd64..37b035edb 100644
--- a/apps/host/src/locales/de.json
+++ b/apps/host/src/locales/de.json
@@ -3187,5 +3187,6 @@
"s3191": "„gpu“ muss eine Grafikkartennummer wie 0 oder eine Liste wie [0, 1] sein.",
"s3192": "Zeile {0}: {1}",
"s3193": "In deiner Einstellungsdatei steckt ein Fehler, deshalb wurde das Modell nicht gestartet.",
- "s3194": "Öffne die Einstellungsdatei unter „Experteneinstellungen“, behebe die unter „Details“ gezeigte Zeile und lade das Modell dann erneut."
+ "s3194": "Öffne die Einstellungsdatei unter „Experteneinstellungen“, behebe die unter „Details“ gezeigte Zeile und lade das Modell dann erneut.",
+ "s3195": "Aktualisiere die Engine (Einstellungen, Engine, „Engine aktualisieren“) und versuche es dann erneut."
}
diff --git a/apps/host/src/locales/en.json b/apps/host/src/locales/en.json
index abad2321e..f8ff647c2 100644
--- a/apps/host/src/locales/en.json
+++ b/apps/host/src/locales/en.json
@@ -3187,5 +3187,6 @@
"s3191": "\"gpu\" must be a graphics card number such as 0, or a list such as [0, 1].",
"s3192": "Line {0}: {1}",
"s3193": "Your settings file has a mistake, so the model was not started.",
- "s3194": "Open the settings file under Expert settings, fix the line shown under Details, then load the model again."
+ "s3194": "Open the settings file under Expert settings, fix the line shown under Details, then load the model again.",
+ "s3195": "Update the engine (Settings, Engine, Update engine), then try again."
}
diff --git a/apps/host/src/locales/es.json b/apps/host/src/locales/es.json
index 44aa044ab..7a4e4bdbb 100644
--- a/apps/host/src/locales/es.json
+++ b/apps/host/src/locales/es.json
@@ -3187,5 +3187,6 @@
"s3191": "«gpu» debe ser el número de una tarjeta gráfica, como 0, o una lista como [0, 1].",
"s3192": "Línea {0}: {1}",
"s3193": "Tu archivo de ajustes tiene un error, así que el modelo no se ha iniciado.",
- "s3194": "Abre el archivo de ajustes en «Ajustes expertos», corrige la línea que aparece en «Detalles» y vuelve a cargar el modelo."
+ "s3194": "Abre el archivo de ajustes en «Ajustes expertos», corrige la línea que aparece en «Detalles» y vuelve a cargar el modelo.",
+ "s3195": "Actualiza el motor (Ajustes, Motor, «Actualizar motor») y vuelve a intentarlo."
}
diff --git a/apps/host/src/locales/ja.json b/apps/host/src/locales/ja.json
index 19714a4d4..584929bef 100644
--- a/apps/host/src/locales/ja.json
+++ b/apps/host/src/locales/ja.json
@@ -3187,5 +3187,6 @@
"s3191": "「gpu」はグラフィックスカードの番号(例: 0)、または [0, 1] のようなリストにしてください。",
"s3192": "{0}行目: {1}",
"s3193": "設定ファイルに誤りがあるため、モデルを起動しませんでした。",
- "s3194": "「上級設定」で設定ファイルを開き、「詳細」に表示された行を修正してから、もう一度モデルを読み込んでください。"
+ "s3194": "「上級設定」で設定ファイルを開き、「詳細」に表示された行を修正してから、もう一度モデルを読み込んでください。",
+ "s3195": "エンジンを更新してから(設定、エンジン、「エンジンを更新」)、もう一度お試しください。"
}
diff --git a/apps/host/src/locales/ko.json b/apps/host/src/locales/ko.json
index f35ff3529..585d77b8e 100644
--- a/apps/host/src/locales/ko.json
+++ b/apps/host/src/locales/ko.json
@@ -3187,5 +3187,6 @@
"s3191": "'gpu'는 0과 같은 그래픽 카드 번호이거나 [0, 1]과 같은 목록이어야 합니다.",
"s3192": "{0}번째 줄: {1}",
"s3193": "설정 파일에 오류가 있어 모델을 시작하지 않았습니다.",
- "s3194": "'전문가 설정'에서 설정 파일을 열고 '세부 정보'에 표시된 줄을 수정한 뒤 모델을 다시 불러오세요."
+ "s3194": "'전문가 설정'에서 설정 파일을 열고 '세부 정보'에 표시된 줄을 수정한 뒤 모델을 다시 불러오세요.",
+ "s3195": "엔진을 업데이트한 뒤(설정, 엔진, '엔진 업데이트') 다시 시도하세요."
}
diff --git a/apps/host/src/locales/pt.json b/apps/host/src/locales/pt.json
index 181656108..67c97df98 100644
--- a/apps/host/src/locales/pt.json
+++ b/apps/host/src/locales/pt.json
@@ -3187,5 +3187,6 @@
"s3191": "«gpu» deve ser o número de uma placa de vídeo, como 0, ou uma lista como [0, 1].",
"s3192": "Linha {0}: {1}",
"s3193": "Seu arquivo de configurações tem um erro, então o modelo não foi iniciado.",
- "s3194": "Abra o arquivo de configurações em «Configurações avançadas», corrija a linha mostrada em «Detalhes» e carregue o modelo novamente."
+ "s3194": "Abra o arquivo de configurações em «Configurações avançadas», corrija a linha mostrada em «Detalhes» e carregue o modelo novamente.",
+ "s3195": "Atualize o mecanismo (Configurações, Mecanismo, «Atualizar mecanismo») e tente novamente."
}
diff --git a/apps/host/src/locales/ru.json b/apps/host/src/locales/ru.json
index 6594fce0b..2c5df09cb 100644
--- a/apps/host/src/locales/ru.json
+++ b/apps/host/src/locales/ru.json
@@ -3187,5 +3187,6 @@
"s3191": "«gpu» должно быть номером видеокарты, например 0, или списком, например [0, 1].",
"s3192": "Строка {0}: {1}",
"s3193": "В файле настроек есть ошибка, поэтому модель не была запущена.",
- "s3194": "Откройте файл настроек в разделе «Экспертные настройки», исправьте строку, указанную в «Подробностях», и загрузите модель снова."
+ "s3194": "Откройте файл настроек в разделе «Экспертные настройки», исправьте строку, указанную в «Подробностях», и загрузите модель снова.",
+ "s3195": "Обновите движок (Настройки, Движок, «Обновить движок») и повторите попытку."
}
diff --git a/apps/host/src/locales/zh.json b/apps/host/src/locales/zh.json
index 0ce81de6c..030d05906 100644
--- a/apps/host/src/locales/zh.json
+++ b/apps/host/src/locales/zh.json
@@ -3187,5 +3187,6 @@
"s3191": "“gpu”必须是显卡编号(如 0),或类似 [0, 1] 的列表。",
"s3192": "第 {0} 行:{1}",
"s3193": "你的设置文件有错误,因此没有启动模型。",
- "s3194": "在“专家设置”中打开设置文件,修复“详情”中显示的那一行,然后重新加载模型。"
+ "s3194": "在“专家设置”中打开设置文件,修复“详情”中显示的那一行,然后重新加载模型。",
+ "s3195": "请更新引擎(设置、引擎、“更新引擎”),然后重试。"
}
diff --git a/apps/host/tests/engine-version.test.mjs b/apps/host/tests/engine-version.test.mjs
new file mode 100644
index 000000000..43d243642
--- /dev/null
+++ b/apps/host/tests/engine-version.test.mjs
@@ -0,0 +1,61 @@
+import test from 'node:test';
+import assert from 'node:assert/strict';
+import { readFile } from 'node:fs/promises';
+import { engineRefusal, engineTooOld, markEngine, parseEngineVersion } from '../server/engine-version.mjs';
+import { nativeFixture } from './helpers/native-fixture.mjs';
+
+test('engine versions compare as numbers, a missing part counting as zero', () => {
+ assert.deepEqual(parseEngineVersion('0.1.45.3'), [0, 1, 45, 3]);
+ assert.deepEqual(parseEngineVersion('v0.1.45'), [0, 1, 45]);
+ assert.equal(parseEngineVersion('dev'), null);
+ assert.equal(engineTooOld('0.1.45', '0.1.45.1'), true, 'the released 0.1.45 stops at v4 files: too old for Gyro');
+ assert.equal(engineTooOld('0.1.45.1', '0.1.45.1'), false);
+ assert.equal(engineTooOld('0.1.45.3', '0.1.45.1'), false);
+ assert.equal(engineTooOld('0.1.46', '0.1.45.1'), false);
+ assert.equal(engineTooOld('0.1.44.1', '0.1.45.1'), true);
+ assert.equal(engineTooOld('0.1.45', null), false, 'no minimum: never too old');
+ assert.equal(engineTooOld(null, '0.1.45.1'), false, 'an unreadable version is not called too old');
+ assert.equal(engineTooOld('0.1.40', '0.1.45.1', 'local'), false, 'an engine built from this checkout has it whatever its number says');
+});
+
+const catalog = () => ({ families: [{ family: 'qwen', sizes: [{ id: 'q2_0', model: 'Q2_0', engine_min: null }] }, { family: 'gyro', sizes: [{ id: 'gyro-gyro-s', model: 'Gyro-S', engine_min: '0.1.45.1' }, { id: 'gyro-gyro-m', model: 'Gyro-M', engine_min: '0.1.45.1' }] }] });
+
+test('the catalog marks the sizes an older engine cannot read; the refusal says what to do', () => {
+ const marked = markEngine(catalog(), { version: '0.1.45' });
+ assert.deepEqual(marked.families.flatMap(f => f.sizes.map(s => [s.id, s.needsNewerEngine])), [['q2_0', false], ['gyro-gyro-s', true], ['gyro-gyro-m', true]]);
+ const text = engineRefusal(marked, 'gyro-gyro-s', { version: '0.1.45' });
+ assert.match(text, /^This model needs a newer engine: Gyro-S needs engine 0\.1\.45\.1 or newer, and this one is 0\.1\.45\. Update the engine in Settings, then try again\.$/);
+ assert.equal(engineRefusal(marked, 'q2_0', { version: '0.1.45' }), null);
+ const fresh = markEngine(catalog(), { version: '0.1.45.3' });
+ assert.ok(fresh.families.every(f => f.sizes.every(s => !s.needsNewerEngine)));
+ assert.equal(markEngine(null, {}), null);
+});
+
+test('with an older engine installed the app refuses to download or load Gyro, with the plain sentence; a new enough engine goes on', async () => {
+ const old = nativeFixture({ engineStatus: { version: '0.1.45', backend: 'cuda' } });
+ try {
+ old.catalog.families.push({ family: 'gyro', title: 'Qwen3.8-Flash-Next (Gyro)', about: '', images: false, sizes: [{ id: 'iq2_xs', model: 'Gyro-S', download_gb: 58, ram_needed_gb: 28, about: '', on_this_pc: 'fits', installed: true, engine_min: '0.1.45.1' }] });
+ old.catalog.families[0].sizes[0].engine_min = '0.1.45.1';
+ const state = await old.control.refresh(true);
+ const sizes = state.catalog.families.flatMap(f => f.sizes);
+ assert.ok(sizes.find(s => s.engine_min).needsNewerEngine);
+ const id = sizes.find(s => s.engine_min).id;
+ assert.throws(() => old.control.operation('load', { model: id }), /This model needs a newer engine: .* needs engine 0\.1\.45\.1 or newer, and this one is 0\.1\.45\./);
+ assert.throws(() => old.control.operation('install', { model: id }), /needs a newer engine/);
+ assert.equal(old.control.state().jobs.length, 0, 'nothing was started');
+ } finally { await old.cleanup(); }
+ const ok = nativeFixture({ engineStatus: { version: '0.1.45.3', backend: 'cuda' } });
+ try {
+ ok.catalog.families[0].sizes[0].engine_min = '0.1.45.1';
+ const state = await ok.control.refresh(true);
+ assert.ok(state.catalog.families[0].sizes.every(s => !s.needsNewerEngine));
+ } finally { await ok.cleanup(); }
+});
+
+test('the screens use the existing "needs a newer engine" notice for a size, and the buttons are held back', async () => {
+ const models = await readFile(new URL('../src/components/NativeModels.tsx', import.meta.url), 'utf8');
+ assert.match(models, /selectedFamily && \(!selectedSize \|\| selectedSize\.needsNewerEngine\) \? <><h2 className="h3">\{tr\("This model needs a newer engine\."\)\}/);
+ assert.match(models, /!!selectedSize\.needsNewerEngine \|\| expert && deviceChoice === 'split'/);
+ const guided = await readFile(new URL('../src/components/GuidedSetup.tsx', import.meta.url), 'utf8');
+ assert.equal((guided.match(/needsNewerEngine/g) ?? []).length, 3);
+});
diff --git a/apps/host/tests/helpers/native-fixture.mjs b/apps/host/tests/helpers/native-fixture.mjs
index a7926bdb0..97be6e043 100644
--- a/apps/host/tests/helpers/native-fixture.mjs
+++ b/apps/host/tests/helpers/native-fixture.mjs
@@ -4,7 +4,7 @@ import {join} from 'node:path';
import {tmpdir} from 'node:os';
import {NATIVE_FIELDS} from '../../server/native-settings.mjs';
import {createNativeControl} from '../../server/native-control.mjs';
-export function nativeFixture({modelsDirectory,tuneHandler}={}){
+export function nativeFixture({modelsDirectory,tuneHandler,engineStatus}={}){
const root=mkdtempSync(join(tmpdir(),'strata-native-test-')),repo=join(root,'repo'),directory=join(root,'data');
const venvBin=process.platform==='win32'?'.venv/Scripts':'.venv/bin',venvPython=process.platform==='win32'?'.venv/Scripts/python.exe':'.venv/bin/python';
for(const path of ['tools','serve',venvBin,'engine/.previous'])mkdirSync(join(repo,path),{recursive:true});
@@ -21,7 +21,7 @@ export function nativeFixture({modelsDirectory,tuneHandler}={}){
if(message.method==='initialize')result={protocolVersion:'2024-11-05'};
else if(message.method==='tools/list')result={tools:['strata_models','strata_status','strata_install'].map(name=>({name}))};
else if(message.params.name==='strata_models')result={structuredContent:catalog};
- else if(message.params.name==='strata_status')result={structuredContent:{installed,hardware,running:external,summary:'Fixture installation'}};
+ else if(message.params.name==='strata_status')result={structuredContent:{installed,hardware,running:external,summary:'Fixture installation',...(engineStatus?{engine:engineStatus}:{})}};
else result={structuredContent:{summary:'Ready to prepare',plan:{download_gb:68},install:{running:false,exit_code:0}}};
queueMicrotask(()=>child.stdout.emit('data',Buffer.from(JSON.stringify({jsonrpc:'2.0',id:message.id,result})+'\n')));
}};
diff --git a/apps/host/tests/plain-errors.test.mjs b/apps/host/tests/plain-errors.test.mjs
index e8f654d45..6221f2ca8 100644
--- a/apps/host/tests/plain-errors.test.mjs
+++ b/apps/host/tests/plain-errors.test.mjs
@@ -9,6 +9,7 @@ const built = await build({ stdin: { contents: "export * from './src/lib/plain-e
const { plainFailure, plainFailureText, setTranslationLanguage } = await import(`data:text/javascript;base64,${Buffer.from(built.outputFiles[0].text).toString('base64')}`);
const cases = [
+ ['This model needs a newer engine: Gyro-S needs engine 0.1.45.1 or newer, and this one is 0.1.45. Update the engine in Settings, then try again.', 'engine-too-old', /needs a newer engine/],
['The settings file for this model has a mistake, so the model was not started. Line 4: The settings file is not valid JSON; look near line 4.', 'settings-file', /settings file has a mistake/],
['The Cloudflare connector (cloudflared) is not installed here, and the app never downloads it while it runs. Install it from the optional connector component.', 'connector-missing', /could not find Cloudflare’s connector/],
['The cloudflared at /usr/bin/cloudflared is version 2021.3.0, which is too old. Strata needs 2022.1.0 or newer. Update cloudflared, then retry.', 'connector-old', /connector on this computer is too old/],
diff --git a/docs/GYRO.md b/docs/GYRO.md
index f92a14bd2..0a513905a 100644
--- a/docs/GYRO.md
+++ b/docs/GYRO.md
@@ -33,8 +33,9 @@ trellis family (types 147-149) that the engine does not have.
Setup downloads the pinned revision of the file (size and SHA-256 checked), prepares the pack (`tools/iq_pack.py
--compat-bf16`: the Hadamard table and the dense weights, 1.5 GB), the draft head (Strata's own MTP head, prepared from
-the original model as for every Qwen3.8-Flash-Next file) and the start script. Needs engine 0.1.45 or newer (the split release); a
-ready-made engine that is older is replaced by one compiled from this source.
+the original model as for every Qwen3.8-Flash-Next file) and the start script. Needs engine 0.1.45.1 or newer: the pack is native_experts.txt v5 (Hadamard-folded), which the engine reads since the
+APR port, and the released 0.1.45 stops at v4. A ready-made engine that is older is replaced by one compiled from this source
+(setup), or the app says the model needs a newer engine and offers Update engine.
**Supported:** NVIDIA (CUDA, Linux and Windows) and AMD (HIP, experimental: the authors validated gfx1151; we ran
gfx1201 with identical output to rc2). **Not supported:** Intel Arc (SYCL) and Apple Metal: the engines there have no
diff --git a/setup.py b/setup.py
index 26457ae5d..cf0e003b9 100644
--- a/setup.py
+++ b/setup.py
@@ -300,9 +300,13 @@ FP4LOCAL_ENGINE = (0, 1, 45)
# agentionai's Gyro files (Qwen3.8-Flash-Next with trellis-coded, Hadamard-rotated experts, TQ2_T / TQK6 / TQK7): one
# GGUF per size, the n-gram table inside it (hence the 58 / 92 GB downloads for 27.6 / 35 GB of memory). The engine
-# reads them from 0.1.45 on (the split release) (ported from agentionai/Strata rc2, MIT); the sizes and SHA-256 are the Hub's LFS pointers
+# reads them from 0.1.45.1 on: the experts are native_experts.txt v5 (Hadamard-folded, hadamard.txt), which the engine reads since the
+# APR port (commit f47b0385f, 2026-10-02, first in the 0.2.0 line). The released 0.1.45 engine reads only up to v4 and refuses a
+# Gyro pack, so 0.1.45 is NOT enough: 0.1.45.1 is the first engine package built after the reader was merged (checked: the
+# "native_experts.txt v5 declares Hadamard-folded experts" message is in every 0.1.45.1+ strata binary and in no 0.1.45 release one).
+# (ported from agentionai/Strata rc2, MIT); the sizes and SHA-256 are the Hub's LFS pointers
# of the revision pinned in HF_REVISIONS. The model's license is Qwen's.
-GYRO_ENGINE = (0, 1, 45)
+GYRO_ENGINE = (0, 1, 45, 1)
GYRO_FILES = {
"Qwen3.8-Flash-Next-Gyro-S-TQ1_0.gguf":
(58487015808, "c6ea1b08ca312f99095b27588ba35976b53f948268e7f91e7761926aa01d9c87"),
diff --git a/tools/strata_mcp.py b/tools/strata_mcp.py
index 61af7795a..bcd8fa825 100644
--- a/tools/strata_mcp.py
+++ b/tools/strata_mcp.py
@@ -79,10 +79,12 @@ FALLBACK_MODELS = {
"vision": True},
"Gyro-S": {"about": "the smallest option, for PCs with little memory (27.6 GB of VRAM + RAM together); lower quality "
"than the 2-3-bit sizes, and the 2-bit Q2_0 decodes faster",
+ "engine": (0, 1, 45, 1),
"download_gb": 58.5, "ram_gb": 27.6, "arena_gb": 25.8, "families": ("gyro",), "mem_total": True,
"vision": False},
"Gyro-M": {"about": "about IQ3_XXS quality with about 20% less GPU memory (35 GB of VRAM + RAM together); decodes "
"about 20% slower than Q2_0 on 12 GB cards",
+ "engine": (0, 1, 45, 1),
"download_gb": 92.0, "ram_gb": 35.0, "arena_gb": 32.1, "families": ("gyro",), "mem_total": True,
"vision": False},
"NVFP4": {"about": "4-bit NVFP4 experts, GPTQ (sergqwer's strata-nvfp4 pack); RTX 50 has FP4 tensor cores, other "
@@ -958,6 +960,9 @@ class Strata:
# RAM + VRAM the weights need together, WITHOUT the n-gram table (that stays on the SSD): Gyro states it
# (mem_total), for the rest the experts plus ~1 GB for the dense part (Swift IQ2_XS: 35.5 + 1 = 36.5)
"mem_total": bool(d.get("mem_total")),
+ # the first engine that reads this size's files (setup.py "engine"); the app says "needs a newer engine"
+ # with the update step when the installed one is older. None: any engine that setup accepts.
+ "engine_min": ".".join(map(str, d["engine"])) if d.get("engine") else None,
"memory_gb": round(float(d["ram_gb"]) if d.get("mem_total") else float(d.get("arena_gb") or d["ram_gb"]) + 1.0, 1),
"on_this_pc": verdict, "installed": tag in have, "id": tag,
# which graphics cards to use for it (strata_control/gpu_fit.py, the one rule app / Terminal / setup share):
diff --git a/tools/test_setup_gyro.py b/tools/test_setup_gyro.py
index 5e9869a4a..797d1fc47 100644
--- a/tools/test_setup_gyro.py
+++ b/tools/test_setup_gyro.py
@@ -52,7 +52,7 @@ class GyroCatalog(unittest.TestCase):
def test_mcp_table_matches(self):
for m in ("Gyro-S", "Gyro-M"):
- for k in ("download_gb", "ram_gb", "arena_gb", "mem_total", "vision"):
+ for k in ("download_gb", "ram_gb", "arena_gb", "mem_total", "vision", "engine"):
self.assertEqual(setup.MODELS[m][k], M.FALLBACK_MODELS[m][k], (m, k))
self.assertEqual(setup.FAMILIES["gyro"]["tag"], M.FALLBACK_FAMILIES["gyro"]["tag"])
@@ -88,11 +88,30 @@ class GyroCatalog(unittest.TestCase):
class GyroEngineVersionTest(unittest.TestCase):
- def test_gyro_needs_the_split_release_engine(self):
- self.assertEqual(setup.GYRO_ENGINE, (0, 1, 45))
+ """Gyro's expert files are native_experts.txt v5 (Hadamard-folded). The released 0.1.45 engine reads only up to v4, so the
+ minimum is 0.1.45.1, the first engine package built after the v5 reader (APR port, f47b0385f) was merged."""
+
+ def test_gyro_needs_an_engine_that_reads_v5_files(self):
+ self.assertEqual(setup.GYRO_ENGINE, (0, 1, 45, 1))
+ self.assertGreater(setup.GYRO_ENGINE, (0, 1, 45)) # the released 0.1.45 is not enough
sizes = [m for m in setup.MODELS.values() if "gyro" in str(m.get("file", "")).lower()]
self.assertEqual(len(sizes), 2)
- self.assertTrue(all(m["engine"] == (0, 1, 45) for m in sizes))
+ self.assertTrue(all(m["engine"] == (0, 1, 45, 1) for m in sizes))
+
+ def test_every_catalog_agrees(self):
+ for m in ("Gyro-S", "Gyro-M"):
+ self.assertEqual(setup.MODELS[m]["engine"], M.FALLBACK_MODELS[m]["engine"], m)
+
+ def test_the_catalog_tells_the_app_the_minimum(self):
+ table = M.Strata(ROOT).model_table(hardware(64.0, 12.0))
+ gyro = {x["model"]: x for x in next(f for f in table if f["family"] == "gyro")["sizes"]}
+ self.assertEqual({k: v["engine_min"] for k, v in gyro.items()}, {"Gyro-S": "0.1.45.1", "Gyro-M": "0.1.45.1"})
+ qwen = {x["model"]: x for x in next(f for f in table if f["family"] == "qwen")["sizes"]}
+ self.assertIsNone(qwen["Q2_0"]["engine_min"]) # a size with no minimum of its own says so
+
+ def test_the_pack_reader_is_in_the_source_this_minimum_describes(self):
+ text = (ROOT / "src" / "kernels" / "cpu" / "expert_layout.cpp").read_text(encoding="utf-8")
+ self.assertIn("native_experts.txt v5 declares Hadamard-folded experts", text)
if __name__ == "__main__":