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

Missing model files are named, with one next step (#3478)

Niko1221d9042a16bdf6
diff --git a/apps/host/server/missing-files.mjs b/apps/host/server/missing-files.mjs
new file mode 100644
index 000000000..f575571a8
--- /dev/null
+++ b/apps/host/server/missing-files.mjs
@@ -0,0 +1,30 @@
+/**
+ * Which files of a model are missing, in words a person can act on (#3478). Control's model list says which required parts of the run
+ * config are absent (`missing`: part + file name), and the installer's status says which GGUF files and shards it could not find
+ * (`missing_files`, full paths). Together they give the names; the app shows them instead of only "some files are missing".
+ */
+import { basename } from 'node:path';
+
+const PART_WORDS = { engine: 'the engine program', 'tokenizer/vocab.json': 'the tokenizer', 'tokenizer/merges.txt': 'the tokenizer', 'tokenizer/token_type.json': 'the tokenizer' };
+
+/** Short readable names, no duplicates, most useful first. */
+export function missingNames(controlParts, installerFiles) {
+ const names = [];
+ const add = text => { const t = String(text ?? '').trim(); if (t && !names.includes(t)) names.push(t); };
+ for (const file of Array.isArray(installerFiles) ? installerFiles : []) add(basename(String(file).split(String.fromCharCode(92)).join('/')));
+ for (const item of Array.isArray(controlParts) ? controlParts : []) {
+ add(PART_WORDS[item?.part] ?? item?.file ?? item?.part);
+ }
+ return names;
+}
+
+/** The error a load or a tune raises for a model that is not whole. Names are in the sentence (at most four) and all of them in `details`. */
+export function missingFilesError(model, names) {
+ const list = names ?? [];
+ const shown = list.slice(0, 4).join(', ') + (list.length > 4 ? ` and ${list.length - 4} more` : '');
+ const error = new Error(list.length
+ ? `Some model files are missing: ${shown}. Use Download / repair to restore them.`
+ : 'Some model files are missing. Use Download / repair to restore them.');
+ error.details = [list.length ? `Missing for ${model}: ${list.join(', ')}` : `Missing for ${model}: Strata could not tell which files`];
+ return error;
+}
diff --git a/apps/host/server/native-control.mjs b/apps/host/server/native-control.mjs
index 0dab2c8dd..a8cf1e9c7 100644
--- a/apps/host/server/native-control.mjs
+++ b/apps/host/server/native-control.mjs
@@ -1,4 +1,5 @@
/** Native Strata control plane. All user actions are explicit; opening the UI only reads state. */
+import {missingFilesError,missingNames} from './missing-files.mjs';
import { spawn } from 'node:child_process';
import {chooseParallel,applyParallel,withoutParallel,FALLBACK_NOTE} from './native-parallel.mjs';
import { randomBytes, randomUUID, createHash } from 'node:crypto';
@@ -106,8 +107,8 @@ export function createNativeControl({directory,requests=()=>[],changed=()=>{},sp
packagedInstall=list.install_dir;
const engine=await control.engine();
const installer=await mcpCall('strata_status',{hardware:true}).catch(error=>({error:error.message}));
- const disk=Object.fromEntries((installer.installed?.models??[]).map(m=>[m.model,{diskGb:m.disk_gb,diskBytes:m.disk_bytes,sharedBytes:m.shared_bytes,removableGb:m.removable_gb,partsMissing:m.parts_missing??0}]));
- const models=(list.models??[]).filter(m=>m.component_status!=='invalid'&&m.source_config).map(m=>({...(disk[m.id]??{}),model:m.id,config:basename(m.source_config),configPath:m.source_config,model_name:m.name,context:m.context_tokens??0,backend:m.backend,ready:m.component_status==='present'&&!(disk[m.id]?.partsMissing),images:'off',port:undefined,last_used:null}));
+ const disk=Object.fromEntries((installer.installed?.models??[]).map(m=>[m.model,{diskGb:m.disk_gb,diskBytes:m.disk_bytes,sharedBytes:m.shared_bytes,removableGb:m.removable_gb,partsMissing:m.parts_missing??0,missingFiles:m.missing_files}]));
+ const models=(list.models??[]).filter(m=>m.component_status!=='invalid'&&m.source_config).map(m=>({...(disk[m.id]??{}),model:m.id,config:basename(m.source_config),configPath:m.source_config,model_name:m.name,context:m.context_tokens??0,backend:m.backend,ready:m.component_status==='present'&&!(disk[m.id]?.partsMissing),missing:missingNames(m.missing,disk[m.id]?.missingFiles),images:'off',port:undefined,last_used:null}));
const cores=os.cpus().length;
return {summary:engine.usable?`Strata Control is ready; engine ${engine.engine.version} (${engine.engine.platform}-${engine.engine.backend}).`:(engine.notice??'No engine for this PC was found.'),
installDir:list.install_dir,engine:{usable:engine.usable,notice:engine.notice,wrongMake:engine.wrongMake===true,version:engine.engine?.version??null,backend:engine.backend,componentsDir:engine.components_dir,previous:engine.previous??null,pinned:engine.pinned??null,updateNotice:engine.update_notice??null},
@@ -230,7 +231,7 @@ return {summary:result.summary??'Deleted',removed:result.plan?.gb??null};}
return {cfg,resources,visionPreferences,parallelChoice,parallelNote};
}
async function loadEngine(job,args){
- await refresh(true);if(job.state!=='running')return;const {config,entry,path:configFile}=record(args.model);assertSettingsFile(configFile);if(packaged){const engine=await control.engine();if(!engine.usable)throw new Error(ENGINE_NOT_RECOGNISED+(engine.notice?` ${engine.notice}`:''));}if(!entry.ready)throw new Error('Some model files are missing. Use Download / repair to restore them.');
+ await refresh(true);if(job.state!=='running')return;const {config,entry,path:configFile}=record(args.model);assertSettingsFile(configFile);if(packaged){const engine=await control.engine();if(!engine.usable)throw new Error(ENGINE_NOT_RECOGNISED+(engine.notice?` ${engine.notice}`:''));}if(!entry.ready){const error=missingFilesError(args.model,entry.missing);append(args.model,error.details[0]);throw error;}
if(externalRunning().length)throw new Error('A Strata server is already running outside this UI. Stop it before loading here, or connect its API in Settings → Models.');
if(args.multiple&&instances.size>=8)throw new Error('Unload an instance before adding another. Up to eight native instances can run here.');
const {cfg,resources,visionPreferences,parallelChoice,parallelNote:chosenNote}=buildConfig(args,config);
diff --git a/apps/host/src/lib/plain-errors.ts b/apps/host/src/lib/plain-errors.ts
index 538b305f6..2812face7 100644
--- a/apps/host/src/lib/plain-errors.ts
+++ b/apps/host/src/lib/plain-errors.ts
@@ -8,13 +8,15 @@ import { tr } from './i18n';
export interface PlainFailure { message: string; next?: string; detail?: string; kind: string }
-interface Rule { kind: string; match: RegExp; message: string; next?: string; detail?: (m: RegExpMatchArray, raw: string) => string | undefined }
+interface Rule { kind: string; match: RegExp; message: string | ((m: RegExpMatchArray) => string); next?: string; detail?: (m: RegExpMatchArray, raw: string) => string | undefined }
const MEMORY = 'The model stopped while starting, most likely because the PC ran low on memory.';
const MEMORY_NEXT = 'Close other programs and try again, or choose “Leave 20% for my work”. In Expert mode you can also turn on the low-RAM option, so part of the model is read from the SSD.';
/** Order matters: the first rule that matches wins. */
const RULES: Rule[] = [
+ // The host names the files it could not find (#3478). The sentence with the names is a template in every language: tr() fills it.
+ { kind: 'model-files-missing', match: /Some model files are missing: (.+?)\. Use Download/i, message: m => `These model files are missing: ${m[1]}.`, next: 'Press Download & load again to fetch them. Files that are already there are kept. If the same files are listed again, open Details and share them when you ask for help.' },
{ kind: 'tunnel-own-running', match: /Strata’s tunnel for this address is already running \(PID/i, message: 'Strata’s tunnel for this address is already running.', next: 'Stop it first, or use it as it is, then connect again here.' },
{ kind: 'gpu-shared', match: /GPU \d+ is already used by .*, so this model did not fit there/i, message: 'Another model on the same graphics card left no room for this one.', next: 'Load it on a different GPU, or unload the other model first.' },
{ kind: 'gpu-no-code', match: /none of this computer.s graphics cards has code in this Strata engine|not an architecture this Strata engine was compiled for/i, message: 'This Strata engine has no code for the graphics card it tried to use.', next: 'Pick another card under Run on, or open Details to see which cards were found and what the engine is built for.' },
@@ -50,7 +52,7 @@ export function plainFailure(raw: string | null | undefined): PlainFailure {
for (const rule of RULES) {
const m = text.match(rule.match);
if (!m) continue;
- return { kind: rule.kind, message: rule.message, next: rule.next, detail: rule.detail ? rule.detail(m, text) : text };
+ return { kind: rule.kind, message: typeof rule.message === 'function' ? rule.message(m) : rule.message, next: rule.next, detail: rule.detail ? rule.detail(m, text) : text };
}
return { kind: 'plain', message: text.replace(/^./, c => c.toUpperCase()) };
}
diff --git a/apps/host/src/locales/de.json b/apps/host/src/locales/de.json
index d181908ce..e8bc2f9f4 100644
--- a/apps/host/src/locales/de.json
+++ b/apps/host/src/locales/de.json
@@ -3489,5 +3489,7 @@
"s8643": "Nur Ihr Prozessor und Arbeitsspeicher werden verwendet.",
"s8644": "Für Experten: Die Engine startet auf den Karten {0} (Hauptkarte zuletzt).",
"s8645": "Wird nicht gespeichert, solange Sie die Empfehlung behalten: Strata wählt neu, wenn Sie eine Karte hinzufügen oder entfernen.",
- "s8646": "Nicht genutzt: {0} (anderer Grafikkarten-Hersteller als der, den diese Engine ansteuert)."
+ "s8646": "Nicht genutzt: {0} (anderer Grafikkarten-Hersteller als der, den diese Engine ansteuert).",
+ "s8647": "Diese Modelldateien fehlen: {0}.",
+ "s8648": "Drücken Sie noch einmal auf „Herunterladen und laden“, um sie zu holen. Vorhandene Dateien bleiben erhalten. Werden dieselben Dateien wieder aufgelistet, öffnen Sie die Details und teilen Sie sie mit, wenn Sie um Hilfe bitten."
}
diff --git a/apps/host/src/locales/en.json b/apps/host/src/locales/en.json
index f1ecc9800..0586014a9 100644
--- a/apps/host/src/locales/en.json
+++ b/apps/host/src/locales/en.json
@@ -3489,5 +3489,7 @@
"s8643": "Only your processor and memory are used.",
"s8644": "For experts: the engine starts on cards {0} (Main last).",
"s8645": "Not saved while you keep the recommendation: Strata picks again if you add or remove a card.",
- "s8646": "Not used: {0} (another make of graphics card than this engine drives)."
+ "s8646": "Not used: {0} (another make of graphics card than this engine drives).",
+ "s8647": "These model files are missing: {0}.",
+ "s8648": "Press Download & load again to fetch them. Files that are already there are kept. If the same files are listed again, open Details and share them when you ask for help."
}
diff --git a/apps/host/src/locales/es.json b/apps/host/src/locales/es.json
index 905102726..e75ad6fc2 100644
--- a/apps/host/src/locales/es.json
+++ b/apps/host/src/locales/es.json
@@ -3489,5 +3489,7 @@
"s8643": "Solo se usan tu procesador y tu memoria.",
"s8644": "Para expertos: el motor arranca en las tarjetas {0} (la principal al final).",
"s8645": "No se guarda mientras mantengas la recomendación: Strata elige de nuevo si añades o quitas una tarjeta.",
- "s8646": "No se usa: {0} (otra marca de tarjeta gráfica distinta de la que maneja este motor)."
+ "s8646": "No se usa: {0} (otra marca de tarjeta gráfica distinta de la que maneja este motor).",
+ "s8647": "Faltan estos archivos del modelo: {0}.",
+ "s8648": "Pulse de nuevo «Descargar y cargar» para obtenerlos. Los archivos que ya están se conservan. Si vuelven a aparecer los mismos archivos, abra los detalles y compártalos cuando pida ayuda."
}
diff --git a/apps/host/src/locales/ja.json b/apps/host/src/locales/ja.json
index eeddc975a..ceb9ef226 100644
--- a/apps/host/src/locales/ja.json
+++ b/apps/host/src/locales/ja.json
@@ -3489,5 +3489,7 @@
"s8643": "プロセッサとメモリのみを使います。",
"s8644": "上級者向け:エンジンはカード {0} で起動します(メインが最後)。",
"s8645": "おすすめのままの間は保存されません。カードを追加・取り外すと Strata が選び直します。",
- "s8646": "未使用:{0}(このエンジンが対応するのとは別メーカーのカードです)。"
+ "s8646": "未使用:{0}(このエンジンが対応するのとは別メーカーのカードです)。",
+ "s8647": "次のモデルファイルが見つかりません: {0}。",
+ "s8648": "もう一度「ダウンロードして読み込む」を押すと取得します。すでにあるファイルはそのまま残ります。同じファイルがまた表示される場合は、詳細を開き、助けを求めるときに共有してください。"
}
diff --git a/apps/host/src/locales/ko.json b/apps/host/src/locales/ko.json
index ea1aded1a..af85abd04 100644
--- a/apps/host/src/locales/ko.json
+++ b/apps/host/src/locales/ko.json
@@ -3489,5 +3489,7 @@
"s8643": "프로세서와 메모리만 사용합니다.",
"s8644": "전문가용: 엔진은 카드 {0}에서 시작합니다 (메인이 마지막).",
"s8645": "추천 설정을 유지하는 동안은 저장되지 않습니다. 카드를 추가하거나 빼면 Strata가 다시 고릅니다.",
- "s8646": "사용 안 함: {0} (이 엔진이 다루는 것과 다른 제조사의 그래픽 카드입니다)."
+ "s8646": "사용 안 함: {0} (이 엔진이 다루는 것과 다른 제조사의 그래픽 카드입니다).",
+ "s8647": "다음 모델 파일이 없습니다: {0}.",
+ "s8648": "'다운로드 및 불러오기'를 다시 누르면 가져옵니다. 이미 있는 파일은 그대로 둡니다. 같은 파일이 다시 표시되면 자세히 보기를 열어 도움을 요청할 때 함께 알려 주세요."
}
diff --git a/apps/host/src/locales/pt.json b/apps/host/src/locales/pt.json
index 7787a542c..0d3b20fa9 100644
--- a/apps/host/src/locales/pt.json
+++ b/apps/host/src/locales/pt.json
@@ -3489,5 +3489,7 @@
"s8643": "Apenas o processador e a memória são usados.",
"s8644": "Para especialistas: o motor inicia nas placas {0} (a principal por último).",
"s8645": "Não é guardado enquanto mantiver a recomendação: o Strata escolhe de novo se adicionar ou remover uma placa.",
- "s8646": "Não usada: {0} (outra marca de placa de vídeo diferente da que este motor controla)."
+ "s8646": "Não usada: {0} (outra marca de placa de vídeo diferente da que este motor controla).",
+ "s8647": "Estes arquivos do modelo estão faltando: {0}.",
+ "s8648": "Pressione Baixar e carregar de novo para buscá-los. Os arquivos que já estão aí são mantidos. Se os mesmos arquivos aparecerem de novo, abra os Detalhes e compartilhe-os ao pedir ajuda."
}
diff --git a/apps/host/src/locales/ru.json b/apps/host/src/locales/ru.json
index ed0d4358d..03cf462a7 100644
--- a/apps/host/src/locales/ru.json
+++ b/apps/host/src/locales/ru.json
@@ -3489,5 +3489,7 @@
"s8643": "Используются только процессор и память.",
"s8644": "Для опытных: движок запускается на картах {0} (основная — последняя).",
"s8645": "Не сохраняется, пока вы оставляете рекомендацию: Strata выберет заново, если вы добавите или уберёте карту.",
- "s8646": "Не используется: {0} (другой производитель видеокарт, чем тот, с которым работает этот движок)."
+ "s8646": "Не используется: {0} (другой производитель видеокарт, чем тот, с которым работает этот движок).",
+ "s8647": "Не хватает этих файлов модели: {0}.",
+ "s8648": "Нажмите «Скачать и загрузить» ещё раз, чтобы получить их. Уже имеющиеся файлы сохраняются. Если те же файлы снова появятся в списке, откройте «Подробности» и приложите их, когда будете просить о помощи."
}
diff --git a/apps/host/src/locales/zh.json b/apps/host/src/locales/zh.json
index f7a00a9df..73a6aa0a9 100644
--- a/apps/host/src/locales/zh.json
+++ b/apps/host/src/locales/zh.json
@@ -3489,5 +3489,7 @@
"s8643": "只使用处理器和内存。",
"s8644": "专家信息:引擎在显卡 {0} 上启动(主卡在最后)。",
"s8645": "沿用推荐设置时不会保存:增减显卡后 Strata 会重新选择。",
- "s8646": "未使用:{0}(与此引擎驱动的显卡品牌不同)。"
+ "s8646": "未使用:{0}(与此引擎驱动的显卡品牌不同)。",
+ "s8647": "缺少这些模型文件:{0}。",
+ "s8648": "再按一次“下载并加载”即可获取。已有的文件会保留。如果再次列出同样的文件,请打开详情,并在求助时一并提供。"
}
diff --git a/apps/host/tests/plain-errors.test.mjs b/apps/host/tests/plain-errors.test.mjs
index ab380f3c0..065b30cb5 100644
--- a/apps/host/tests/plain-errors.test.mjs
+++ b/apps/host/tests/plain-errors.test.mjs
@@ -73,3 +73,31 @@ test('every plain message and next step is translated in all eight languages', (
assert.doesNotMatch(plainFailure('server_exited (exit code 0xC0000135)').message + plainFailure('server_exited (exit code 0xC0000135)').next, /memory|Leave 20/i);
setTranslationLanguage('en');
});
+
+test('missing model files are named, in every language, with a next step (#3478)', async () => {
+ const { missingFilesError, missingNames } = await import('../server/missing-files.mjs');
+ const names = missingNames([{ part: 'engine', file: 'strata.exe', status: 'missing' }, { part: 'native', file: 'Qwen3.6-35B-A3B-UD-Q4_K_XL.gguf', status: 'missing' }, { part: 'vision/mmproj', file: 'mmproj-F16.gguf', status: 'missing' }],
+ [['C:', 'models', 'Qwen3.6-35B-A3B-UD-Q4_K_XL-00002-of-00003.gguf'].join(String.fromCharCode(92)), '/data/models/mmproj-F16.gguf']);
+ assert.deepEqual(names, ['Qwen3.6-35B-A3B-UD-Q4_K_XL-00002-of-00003.gguf', 'mmproj-F16.gguf', 'the engine program', 'Qwen3.6-35B-A3B-UD-Q4_K_XL.gguf']);
+ const error = missingFilesError('qwen36-q4', names);
+ assert.match(error.message, /missing: Qwen3\.6-35B-A3B-UD-Q4_K_XL-00002-of-00003\.gguf, mmproj-F16\.gguf, the engine program, Qwen3\.6-35B-A3B-UD-Q4_K_XL\.gguf\. Use Download/);
+ assert.match(error.details[0], /Missing for qwen36-q4: /);
+ const more = missingFilesError('m', ['a.gguf', 'b.gguf', 'c.gguf', 'd.gguf', 'e.gguf', 'f.gguf']);
+ assert.match(more.message, /a\.gguf, b\.gguf, c\.gguf, d\.gguf and 2 more\./);
+ const f = plainFailure(error.message);
+ assert.equal(f.kind, 'model-files-missing');
+ assert.equal(f.message, 'These model files are missing: Qwen3.6-35B-A3B-UD-Q4_K_XL-00002-of-00003.gguf, mmproj-F16.gguf, the engine program, Qwen3.6-35B-A3B-UD-Q4_K_XL.gguf.');
+ assert.ok(f.next && f.detail === error.message);
+ for (const language of languages) {
+ setTranslationLanguage(language);
+ const shown = plainFailureText(error.message);
+ if (language !== 'en') {
+ assert.notEqual(shown.message, f.message, `${language}: the sentence is translated`);
+ assert.notEqual(shown.next, f.next, `${language}: the next step is translated`);
+ }
+ assert.ok(shown.message.includes('mmproj-F16.gguf'), `${language}: the file names survive`);
+ assert.doesNotMatch(shown.message, /\{0\}/);
+ }
+ setTranslationLanguage('en');
+ assert.equal(plainFailure(missingFilesError('m', []).message).kind, 'plain', 'with no names the old sentence is left as it was');
+});
diff --git a/strata_control/models.py b/strata_control/models.py
index a42d85393..d0b68d80f 100644
--- a/strata_control/models.py
+++ b/strata_control/models.py
@@ -143,6 +143,18 @@ def _arg(args: list[str], flag: str) -> str | None:
return None
+def _missing_parts(report: dict) -> list[dict]:
+ """The required parts a model's run config names that are not there: {"part": the component, "file": its file or folder name,
+ "status": "missing" | "invalid"}. The app names them so a person is not told only that "some files are missing" (#3478)."""
+ found = []
+ for item in report.get("components", []):
+ if item.get("required") and item.get("status") in ("missing", "invalid"):
+ where = item.get("path")
+ found.append({"part": _short(item.get("name")), "file": _short(os.path.basename(str(where).rstrip("/\\"))) if where else None,
+ "status": item["status"]})
+ return found[:12]
+
+
def _summary(model_id: str, path: Path, raw: bytes, cfg: dict, report: dict) -> dict:
context = _arg(cfg["args"], "--max-context")
context_tokens = int(context) if isinstance(context, str) and 1 <= len(context) <= 8 and \
@@ -154,6 +166,7 @@ def _summary(model_id: str, path: Path, raw: bytes, cfg: dict, report: dict) ->
"context_tokens": context_tokens,
"component_status": "present" if report["ok"] else "missing_or_invalid",
"issue_codes": [item.get("code") for item in report["issues"]][:32],
+ "missing": _missing_parts(report),
"execution_compatibility": "unverified"}
diff --git a/tests/terminal/test_models.py b/tests/terminal/test_models.py
index a7aad4769..b4f62a017 100644
--- a/tests/terminal/test_models.py
+++ b/tests/terminal/test_models.py
@@ -93,6 +93,9 @@ class ModelInventoryTests(unittest.TestCase):
self.assertEqual(code, 0)
self.assertEqual(listed["models"][0]["component_status"], "missing_or_invalid")
self.assertIn("COMPONENT_MISSING", listed["models"][0]["issue_codes"])
+ # #3478: the list names what is missing, so the app can say which files instead of only "some files are missing"
+ self.assertEqual([(m["part"], m["file"], m["status"]) for m in listed["models"][0]["missing"]],
+ [("tokenizer/vocab.json", "vocab.json", "missing")])
(self.root / "strata-broken.json").write_text("{broken", encoding="utf-8")
code, listed = self.command("list", "--installed")
self.assertEqual(code, 0)