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

launch: setup's DeepSeek engine upgrade lines (the failure one 'A newer DeepSeek engine is available but could not be installed') are shown on the setup path too; test

Niko12219c375ccb7d98
diff --git a/strata_cli/launch/runner.py b/strata_cli/launch/runner.py
index 410e31419..73f4d1806 100644
--- a/strata_cli/launch/runner.py
+++ b/strata_cli/launch/runner.py
@@ -77,6 +77,20 @@ def python_failure(lines: list[str]) -> str | None:
return None
+DEEPSEEK_ENGINE_LINE = re.compile(r"(A newer DeepSeek engine (?:is available|may be available)[^\r\n]*|DeepSeek engine updated from [^\r\n]*)")
+
+
+def deepseek_engine_note(line: str) -> tuple[str, str] | None:
+ """setup's line about the DeepSeek engine upgrade ("A newer DeepSeek engine is available but could not be installed: ...; still using X",
+ or "DeepSeek engine updated from X to Y"): ("warn" | "info", the sentence), None for any other line. The failure line must reach the
+ person: the model starts with the engine they have, and they should know there is a newer one."""
+ found = DEEPSEEK_ENGINE_LINE.search(line)
+ if not found:
+ return None
+ text = found.group(1).strip()
+ return ("info" if text.startswith("DeepSeek engine updated") else "warn", text)
+
+
def argparse_failure(lines: list[str]) -> str:
"""setup.py's own refusal of an option ("setup.py: error: argument --kv: invalid choice: ..."), which is neither an [X] line nor a
traceback (#3785): the words after "error:" are the cause."""
@@ -498,6 +512,7 @@ class Runner:
self.hardware_override = hardware
self.children: list[subprocess.Popen] = []
self.notices: list[str] = []
+ self._engine_notes: set[str] = set()
self.identity_notes: list[str] = []
self.tune_result: dict | None = None
self.config_path: Path | None = None
@@ -1003,6 +1018,12 @@ class Runner:
continue
lines.append(line)
lines[:] = lines[-1500:]
+ note = deepseek_engine_note(line)
+ if note and note[1] not in self._engine_notes: # setup's DeepSeek engine lines are shown, not condensed away (0.2.5 list)
+ self._engine_notes.add(note[1])
+ if note[0] == "warn":
+ self.notices.append(note[1])
+ self.emit("model", note[1], None, level=note[0], step=step_seen)
prog = cat.mcp.install_progress(lines)
prog = cat.mcp.combined_progress(prog, job)
dl, phase, label = prog.get("download"), prog.get("phase"), prog.get("label")
diff --git a/tests/terminal/test_dsv41_upgrade.py b/tests/terminal/test_dsv41_upgrade.py
index 24eb0ee16..dc726ceb8 100644
--- a/tests/terminal/test_dsv41_upgrade.py
+++ b/tests/terminal/test_dsv41_upgrade.py
@@ -159,5 +159,19 @@ class LaunchChoice(unittest.TestCase):
self.assertEqual(self.runner().upgrade_dsv41_engine(found), new)
+class SetupPathLines(unittest.TestCase):
+ """The upgrade lines setup prints are shown by strata launch, the failure one especially (0.2.5 list)."""
+
+ def test_the_failure_line_is_a_warning_and_the_success_line_is_news(self):
+ from strata_cli.launch.runner import deepseek_engine_note
+ bad = deepseek_engine_note(" A newer DeepSeek engine is available but could not be installed: no space left; still using 0.1.49.")
+ self.assertEqual(bad[0], "warn")
+ self.assertTrue(bad[1].endswith("still using 0.1.49."))
+ self.assertEqual(deepseek_engine_note("[!] A newer DeepSeek engine may be available but could not be checked (OSError); still using 0.1.49.")[0], "warn")
+ good = deepseek_engine_note(" DeepSeek engine updated from 0.1.49 to 0.1.49.2.")
+ self.assertEqual(good, ("info", "DeepSeek engine updated from 0.1.49 to 0.1.49.2."))
+ self.assertIsNone(deepseek_engine_note(" checking model.gguf (SHA-256, 5 GB) ..."))
+
+
if __name__ == "__main__":
unittest.main()