Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Studio: never launch wxc-exec on Windows older than build 26100 (#16384)
Daniel Han2ad59e7b88ac
diff --git a/studio/backend/core/inference/mxc_runtime.py b/studio/backend/core/inference/mxc_runtime.pyindex a668cc5d369..2e25866c84e 100644--- a/studio/backend/core/inference/mxc_runtime.py+++ b/studio/backend/core/inference/mxc_runtime.py@@ -44,6 +44,9 @@ _ARCHITECTURES = ("x86_64", "arm64")HOST_PREP_STEPS = ("prepare-system-drive", "prepare-null-device")HOST_PREP_PROBE_SECONDS = 10.0DACL_RECOVERY_SECONDS = 60.0+# mxc_probe never uses MXC below this build, and some of those (Server 2019) cannot load wxc-exec: the+# loader shows a modal "System Error" dialog instead of returning an exit code (#16169).+MIN_WINDOWS_BUILD = 26100_WXC_EXEC_NAME = "wxc-exec.exe"_WXC_HOST_PREP_NAME = "wxc-host-prep.exe"@@ -266,7 +269,16 @@ def _open_artifact_guard(path: Path) -> object:return _WindowsHandleGuard(int(handle))+def _require_supported_windows() -> None:+ windows_version = getattr(sys, "getwindowsversion", None)+ if windows_version is not None and windows_version().build < MIN_WINDOWS_BUILD:+ raise MxcRuntimeUnavailable(+ f"Microsoft MXC needs Windows 11 build {MIN_WINDOWS_BUILD} or newer"+ )++def _acquire(select, package_root: Path | None) -> RuntimeLease:+ _require_supported_windows()with _lock:info = select(package_root = package_root)guard = _open_artifact_guard(info.path)diff --git a/studio/backend/tests/test_mxc_runtime_integrity.py b/studio/backend/tests/test_mxc_runtime_integrity.pyindex a4e3fdd1af0..9aa705e0f35 100644--- a/studio/backend/tests/test_mxc_runtime_integrity.py+++ b/studio/backend/tests/test_mxc_runtime_integrity.py@@ -6,6 +6,7 @@ import hashlibimport jsonfrom pathlib import Pathimport subprocess+from types import SimpleNamespaceimport pytest@@ -257,3 +258,34 @@ def test_host_prep_probe_timeout_is_not_a_verdict(runtime, monkeypatch):monkeypatch.setattr(mxc_runtime.subprocess, "run", run)assert mxc_runtime.probe_host_prep_steps(package_root = runtime) is None++[email protected]("build", [17763, 20348, 22631])+def test_older_windows_never_launches_wxc(runtime, monkeypatch, tmp_path, build):+ # Server 2019 showed wxc-exec loader dialogs on every Settings > Sandbox visit (#16169).+ monkeypatch.setenv("UNSLOTH_STUDIO_HOME", str(tmp_path / "home"))+ monkeypatch.setattr(+ mxc_runtime.sys,+ "getwindowsversion",+ lambda: SimpleNamespace(build = build),+ raising = False,+ )+ monkeypatch.setattr(+ mxc_runtime.subprocess, "run", lambda *_a, **_k: pytest.fail("wxc-exec was launched")+ )+ assert mxc_runtime.selected_runtime(package_root = runtime).path.name == "wxc-exec.exe"+ with pytest.raises(mxc_runtime.MxcRuntimeUnavailable, match = "26100"):+ mxc_runtime.acquire_runtime(package_root = runtime)+ assert mxc_runtime.probe_host_prep_steps(package_root = runtime) is None+ assert mxc_runtime.recover_dacl_state() is False+++def test_windows_11_24h2_still_launches_wxc(runtime, monkeypatch):+ monkeypatch.setattr(+ mxc_runtime.sys,+ "getwindowsversion",+ lambda: SimpleNamespace(build = 26100),+ raising = False,+ )+ with mxc_runtime.acquire_runtime(package_root = runtime) as lease:+ assert lease.info.path == (runtime / "wxc-exec.exe").resolve()