Summary
When configuring LM Studio on Linux with a model path ("downloadsFolder" key in settings.json) that contains ~, the path is not expanded to the user's home directory. Instead, it appears to be treated as a relative path and appended to another model directory, resulting in invalid nested paths and models not being indexed.
Environment
- LM Studio version:
CLI commit: efce996
- OS:
Kubuntu 26.04
- Installation method: LM Studio CLI (
lms) and LM Studio Server
Steps to Reproduce
- Configure the model directory in
settings.json using a path containing ~, for example:
- Import a model:
lms import LFM2-8B-A1B-Q4_K_M.gguf
- Observe the resulting directory structure.
Expected Behaviour
The ~ should be expanded to the user's home directory:
/home/me/.lmstudio/models/LiquidAI/LFM2-8B-A1B-GGUF
Actual Behaviour
A path containing the literal ~ is created and appended to another model directory, resulting in a malformed nested path such as:
~/.lmstudio/models/liquid/LFM2-8B-A1B-Q4_K_M/~/.lmstudio/models/LiquidAI/LFM2-8B-A1B-GGUF
The model is not correctly indexed and does not appear in lms ls.
Workaround
Replacing ~ with the full absolute path in settings.json fixes the issue:
/home/me/.lmstudio/models
Summary
When configuring LM Studio on Linux with a model path ("downloadsFolder" key in settings.json) that contains
~, the path is not expanded to the user's home directory. Instead, it appears to be treated as a relative path and appended to another model directory, resulting in invalid nested paths and models not being indexed.Environment
CLI commit: efce996Kubuntu 26.04lms) and LM Studio ServerSteps to Reproduce
settings.jsonusing a path containing~, for example:Expected Behaviour
The
~should be expanded to the user's home directory:Actual Behaviour
A path containing the literal
~is created and appended to another model directory, resulting in a malformed nested path such as:The model is not correctly indexed and does not appear in
lms ls.Workaround
Replacing
~with the full absolute path insettings.jsonfixes the issue: