Skip to content

fix(controller): use per-user models dir and OS temp dir defaults on Windows#187

Merged
0xSero merged 3 commits into
sybil-solutions:mainfrom
luminary19:up/controller-defaults
Jul 13, 2026
Merged

fix(controller): use per-user models dir and OS temp dir defaults on Windows#187
0xSero merged 3 commits into
sybil-solutions:mainfrom
luminary19:up/controller-defaults

Conversation

@luminary19

Copy link
Copy Markdown
Contributor

Summary

The models-dir default (/models) and the log fallback dir (/tmp) are POSIX literals; on Windows the former points at a non-existent drive root and the latter throws inside the fallback path itself. This defaults the models dir to ~/models on win32 (POSIX keeps /models), replaces the /tmp literal with os.tmpdir() (which is /tmp on Linux), and comments the template default in .env.example so the platform default applies unless overridden. Fixes #186.

Validation

cd controller
bun run typecheck   # clean
bun run lint        # clean

Verified live on Windows 11: boot summary shows models_dir=C:\Users\<user>\models, and model listing + llama.cpp launch work end-to-end. Linux behavior is unchanged by construction: the non-win32 models default stays /models and os.tmpdir() returns /tmp.

Note: the controller test:unit suite currently has POSIX-only fixtures that fail when run on Windows (unrelated to this change — those are addressed in a separate test-portability PR); this branch touches only env.ts and log-files.ts and does not alter any test.

UI changes

None.

Risks / rollout notes

  • Anyone who copied the .env.example LOCAL_STUDIO_MODELS_DIR=/models line verbatim must uncomment it to keep an explicit override; the in-code POSIX default is identical, so nothing changes on Linux/macOS unless that override was being relied upon.

@0xSero 0xSero left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — the POSIX models-dir default stays literally /models by construction (the homelab relies on exactly that), and os.tmpdir() is the right call for the fallback log dir. One note for the record: on macOS os.tmpdir() returns $TMPDIR rather than /tmp, so the mac fallback log dir moves (self-consistent — old /tmp/vllm_*.log files just stop being listed); the "Linux behavior unchanged" claim is Linux-only, not all-POSIX. Dependency Review failure is our repo config, not this PR.

@0xSero 0xSero merged commit 9f79742 into sybil-solutions:main Jul 13, 2026
5 of 6 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.65.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Controller defaults hardcode POSIX paths on Windows - /models and /tmp do not exist

2 participants