{"record":{"id":"6c9787eb3d484708","repo":"odysseus-dev/odysseus","slug":"remote-windows-diffusers-serving-is-not-supported","errorCode":null,"errorMessage":"Remote Windows Diffusers serving is not supported yet; use local Windows or a Linux remote server.","messagePattern":"Remote Windows Diffusers serving is not supported yet; use local Windows or a Linux remote server\\.","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"routes/cookbook_routes.py","lineNumber":2057,"sourceCode":"        # below still registers the stale 11434 default — which on a host with\n        # a systemd ollama lands on the wrong (unreachable-from-docker) service.\n        # Match \"ollama serve\" as a phrase (with optional flags after), not\n        # any substring containing \"ollama\" — otherwise commands like\n        # `docker exec ollama-test ollama-import …` get wrapped as if they\n        # were native `ollama serve`, prepending OLLAMA_HOST=… and then\n        # running the ollama-not-found preflight which exits 127.\n        if re.search(r\"\\bollama\\s+serve\\b\", req.cmd) and \"OLLAMA_HOST=\" not in req.cmd:\n            _ollama_bind_host = \"0.0.0.0\" if remote else \"127.0.0.1\"\n            _ollama_chosen_port = _pick_free_port_for_ollama(\n                remote, req.ssh_port, start_port=11434, max_offset=10,\n            )\n            if _ollama_chosen_port:\n                req.cmd = f\"OLLAMA_HOST={_ollama_bind_host}:{_ollama_chosen_port} {req.cmd}\"\n        # LOCAL execution on a native-Windows host never uses tmux (detached\n        # process path below), regardless of the UI-supplied platform.\n        local_windows = IS_WINDOWS and not remote\n        if is_windows and remote and \"diffusion_server.py\" in req.cmd:\n            raise HTTPException(\n                400,\n                \"Remote Windows Diffusers serving is not supported yet; use local Windows or a Linux remote server.\",\n            )\n\n        if not is_windows and not local_windows and not await _binary_available(\"tmux\", remote, req.ssh_port):\n            return {\n                \"ok\": False,\n                \"error\": _missing_binary_message(\"tmux\", remote or \"local server\"),\n                \"session_id\": session_id,\n            }\n        if _needs_binary(req.cmd, \"docker\") and not await _binary_available(\"docker\", remote, req.ssh_port, windows=is_windows):\n            local_host_docker_blocked = (\n                not remote\n                and running_in_container()\n                and not host_docker_access_enabled()\n            )\n            return {\n                \"ok\": False,","sourceCodeStart":2039,"sourceCodeEnd":2075,"githubUrl":"https://github.com/odysseus-dev/odysseus/blob/f9235ebbf13f693a6fd29ce70b097f6ec83705bf/routes/cookbook_routes.py#L2039-L2075","documentation":"Raised (HTTP 400) by the cookbook run/session endpoint when the request targets a remote Windows host (is_windows=true combined with remote=true) and the command to launch contains 'diffusion_server.py'. The backend can start Diffusers serving locally on Windows or on a remote Linux box via SSH+tmux, but the combination 'remote + Windows + diffusion_server.py' is explicitly unsupported and rejected before any process is spawned. This is a hard preflight guard, not a runtime failure.","triggerScenarios":"POST to the cookbook run/session endpoint with body fields selecting a remote host (remote=true, is_windows=true) and a cmd string that includes 'diffusion_server.py' (the Diffusers image-generation server launcher). Any UI state that remembers 'Windows' as the platform while an SSH host is configured will trip this on the next Diffusers serve request.","commonSituations":"User previously used a local Windows machine, then switched the cookbook target to a Linux SSH server but the UI still sends platform=windows; or a user tries to point the app at a remote Windows box over SSH to reuse its GPU. Both are rejected by design.","solutions":["Run the Diffusers server locally on the Windows machine (no remote host set) — local Windows serving is supported via the detached-process path.","Point the remote host at a Linux server: clear the remote Windows target and re-run with a Linux SSH host.","If you maintain the calling UI, force the platform selector to Linux/auto whenever a remote host is set, so the request can never combine is_windows=true with remote=true."],"exampleFix":"// before\nconst body = { cmd: 'python diffusion_server.py', remote: sshHost, is_windows: true };\nawait post('/api/cookbook/run', body); // 400\n\n// after\nconst body = { cmd: 'python diffusion_server.py', remote: null }; // local Windows\nawait post('/api/cookbook/run', body);","handlingStrategy":"validation","validationCode":"// Client-side guard before launching Diffusers serving\nfunction assertDiffusersTargetSupported({ remote, is_windows, cmd }) {\n  if (remote && is_windows && cmd.includes('diffusion_server.py')) {\n    throw new Error('Remote Windows Diffusers serving is unsupported — run locally on Windows or use a Linux remote.');\n  }\n}","typeGuard":null,"tryCatchPattern":"try { const res = await post('/api/cookbook/run', body); } catch (e) { if (e.status === 400 && /Remote Windows Diffusers/.test(e.message)) { showBanner('Switch to local Windows or a Linux remote host.'); } else throw e; }","preventionTips":["Force the platform selector to Linux/auto whenever a remote SSH host is configured.","Disable the Diffusers serve button while remote+Windows is selected, with an explanatory tooltip."],"tags":["cookbook","diffusers","remote-execution","windows","validation"],"backgroundTag":null,"analyzedSha":"f9235ebbf13f693a6fd29ce70b097f6ec83705bf","analyzedAt":"2026-08-14T21:47:48.359Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}