fix(controller): use per-user models dir and OS temp dir defaults on Windows#187
Merged
Merged
Conversation
This was referenced Jul 13, 2026
0xSero
approved these changes
Jul 13, 2026
0xSero
left a comment
Collaborator
There was a problem hiding this comment.
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.
|
🎉 This PR is included in version 1.65.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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~/modelson win32 (POSIX keeps/models), replaces the/tmpliteral withos.tmpdir()(which is/tmpon Linux), and comments the template default in.env.exampleso the platform default applies unless overridden. Fixes #186.Validation
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/modelsandos.tmpdir()returns/tmp.Note: the controller
test:unitsuite 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 onlyenv.tsandlog-files.tsand does not alter any test.UI changes
None.
Risks / rollout notes
.env.exampleLOCAL_STUDIO_MODELS_DIR=/modelsline 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.