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++
Host: the per-model settings routes accept a dotted id; a test walks a dotted model id through list, load and unload
Niko122175ee28fd3da5
diff --git a/apps/host/server/index.mjs b/apps/host/server/index.mjsindex 8bc2948f9..3dfdb3799 100644--- a/apps/host/server/index.mjs+++ b/apps/host/server/index.mjs@@ -1023,11 +1023,11 @@ async function api(req, res, path, method, url) {if(nativeOperation&&method==='POST')return json(res,200,await native.cancel(nativeOperation[1]));const nativeInstance=/^\/api\/native\/instances\/([a-z0-9-]+)\/(unload|default)$/.exec(path);if(nativeInstance&&method==='POST')return json(res,200,nativeInstance[2]==='unload'?await native.unload(nativeInstance[1]):native.setDefault(nativeInstance[1]));- const nativeSettings=/^\/api\/native\/models\/([a-z0-9_-]+)\/settings$/.exec(path);+ const nativeSettings=/^\/api\/native\/models\/([a-z0-9_.-]+)\/settings$/.exec(path);/* Expert mode shows what will actually run: the saved tuning's values come with the settings (null when none applies or unreadable). */if(nativeSettings&&method==='GET'){const settings=native.settings(nativeSettings[1]);let tuned=null;try{const t=await native.tuneEffective({model:nativeSettings[1],resourceProfile:url.searchParams.get('resourceProfile')||undefined,vision:url.searchParams.get('vision')||undefined});tuned=t.applied?t:null;}catch{tuned=null;}return json(res,200,{...settings,tuned});}if(nativeSettings&&method==='PATCH')return json(res,200,native.save(nativeSettings[1],await readBody(req)));- const nativeSettingsFile=/^\/api\/native\/models\/([a-z0-9_-]+)\/settings-file$/.exec(path);+ const nativeSettingsFile=/^\/api\/native\/models\/([a-z0-9_.-]+)\/settings-file$/.exec(path);if(nativeSettingsFile&&method==='GET')return json(res,200,native.settingsFile(nativeSettingsFile[1]));if(nativeSettingsFile&&method==='POST')return json(res,200,await native.openSettingsFile(nativeSettingsFile[1]));diff --git a/apps/host/tests/packaged-control.test.mjs b/apps/host/tests/packaged-control.test.mjsindex 3df33b5a9..957c77fcb 100644--- a/apps/host/tests/packaged-control.test.mjs+++ b/apps/host/tests/packaged-control.test.mjs@@ -85,13 +85,13 @@ test('runCli passes the arguments untouched (no shell) and reads JSON', async ()// ---------------------------------------------------------------------------------- native-control in packaged mode-function packagedFixture({ engineUsable = true, updater = null, repair = false } = {}) {+function packagedFixture({ engineUsable = true, updater = null, repair = false, ids = ['iq2_xs', 'iq3_s'] } = {}) {const root = mkdtempSync(join(tmpdir(), 'strata-packaged-test-'));const install = join(root, 'install'), data = join(root, 'data');mkdirSync(install, { recursive: true });const earlierInstallEnv = process.env.STRATA_INSTALL_DIR;process.env.STRATA_INSTALL_DIR = install; // the app's own install folder (the host always tells Control which one; it never falls back to an older CLI folder)- const configs = ['iq2_xs', 'iq3_s'].map(id => {+ const configs = ids.map(id => {const path = join(install, `strata-${id}.json`);writeFileSync(path, JSON.stringify({ exe: 'component:strata-engine', tokenizer: join(install, 'tok'), args: ['--max-context', '32768'], model_name: `Qwen ${id}`, port: 8080 }));return { id, path };@@ -201,6 +201,26 @@ test('packaged: load = saved profile + runtime start under Control; unload = run} finally { await f.native.close(); f.cleanup(); }});+test('packaged: a model id with dots (DeepSeek) is listed, loaded from its run config, and unloaded', async () => {+ const id = 'deepseek-v4.1-flash-ist-das-2.00bpw';+ const f = packagedFixture({ ids: [id] });+ try {+ const state = await f.native.refresh(true);+ assert.deepEqual(state.installed.models.map(m => m.model), [id], 'listed (the install finished but the app used to show nothing)');+ assert.equal(state.installed.models[0].ready, true);+ const job = await finish(f.native, f.native.operation('load', { model: id }).id);+ assert.equal(job.state, 'done', job.error); // used to end with "The model configuration is outside the Strata installation."+ assert.deepEqual(f.calls.filter(c => ['saveProfile', 'start'].includes(c[0])).map(c => c.slice(0, 2)), [['saveProfile', 'app-1'], ['start', 'app-1']]);+ const instance = f.native.state().instances[0];+ assert.equal(instance.model, id);+ assert.equal(instance.status, 'ready');+ await f.native.unload(instance.id);+ assert.deepEqual(f.calls.filter(c => c[0] === 'stop').at(-1), ['stop', 'app-1']);+ assert.equal(f.native.state().instances.length, 0);+ for (const odd of ['a..b', '../x', 'x/y', '.hidden']) assert.equal((await finish(f.native, f.native.operation('load', { model: odd }).id)).state, 'error', odd);+ } finally { await f.native.close(); f.cleanup(); }+});+test('packaged: no engine for this PC is the notice, and nothing is started', async () => {const f = packagedFixture({ engineUsable: false });try {