lmstudio-ai / configs

LM Studio JSON configuration file format and a collection of example config files.
MIT License
172 stars 26 forks source link

How to set up a network proxy in a configuration file #18

Open anuxs opened 5 months ago

anuxs commented 5 months ago

I'm behind a vpn and I can't download any LLama model via LM and the network times out. But if I paste the downloaded URL into the browser, it can be downloaded. The LM is apparently requesting the network directly, without using the system network proxy setup I use windows 11.

yagil commented 5 months ago

@anuxs we are actively investigating this. It would be really helpful to be able to send you a beta build to test a few options to fix this issue.

If you're open to it, would you mind emailing team@lmstudio.ai? Thank you in advance!

Idzana commented 4 months ago

Hello! I had a similar problem with a computer behind a proxy server. Is any idea how resolve this problem?

hhmmjjnn commented 4 months ago

I tried to set the HTTPS_PROXY environment variable, but it doesn't seem to comply with that.

image

lzjever commented 4 months ago

Same here. Launching lmstudio with those proxy configurations: ❯ env | grep PROXY HTTP_PROXY=http://127.0.0.1:8889 HTTPS_PROXY=http://127.0.0.1:8889 FTP_PROXY=http://127.0.0.1:8889 RSYNC_PROXY=http://127.0.0.1:8889 ALL_PROXY=socks5://127.0.0.1:1089

reports: 12:49:47.536 › Failed to search models: 'Error: Network error' There was a network error: fetch failed

tears743 commented 4 months ago

Mac下可以直接修改model-catalog.json的downloadUrl 为镜像地址可以正常下载,具体文件位置Mac下在 ~/Library/Application Support/LM Studio/,windows上可能在C:\Users\\AppData\Local\,windows 我没有验证,大家自行摸索一下;需要注意的是,应用关闭后重新打开是会重新下载这个文件,修改会被覆盖,需要重新替换...

kaiwater commented 4 months ago

proxychains -lv "%USERPROFILE%\AppData\Local\LM-Studio\LM Studio.exe"

it's work for me , windows11

iguoli commented 4 months ago

proxychains -lv "%USERPROFILE%\AppData\Local\LM-Studio\LM Studio.exe"

it's work for me , windows11

it reports below error message on my laptop (windwos 10)

[PID18992] [W] 2024/03/04 11:14:18 GetThreadContext() Failed: The parameter is incorrect.(87) [PID18992] [E] 2024/03/04 11:14:18 Injecting WINPID 20612 Error: The parameter is incorrect.(87) [I] 2024/03/04 11:14:23 All Windows descendant process exited. [I] 2024/03/04 11:14:23 Master exiting

kaiwater commented 4 months ago

proxychains -lv "%USERPROFILE%\AppData\Local\LM-Studio\LM Studio.exe" it's work for me , windows11

it reports below error message on my laptop (windwos 10)

[PID18992] [W] 2024/03/04 11:14:18 GetThreadContext() Failed: The parameter is incorrect.(87) [PID18992] [E] 2024/03/04 11:14:18 Injecting WINPID 20612 Error: The parameter is incorrect.(87) [I] 2024/03/04 11:14:23 All Windows descendant process exited. [I] 2024/03/04 11:14:23 Master exiting

sorry my bad,

proxychains -lv "%USERPROFILE%\AppData\Local\LM-Studio\app-0.2.16\LM Studio.exe"

should care about folder name everytime when update.

LosUnidades commented 3 months ago

Mac下可以直接修改model-catalog.json的downloadUrl 为镜像地址可以正常下载,具体文件位置Mac下在 ~/Library/Application Support/LM Studio/,windows上可能在C:\Users\AppData\Local,windows 我没有验证,大家自行摸索一下;需要注意的是,应用关闭后重新打开是会重新下载这个文件,修改会被覆盖,需要重新替换...

model-catalog.json在什么位置呀,LM Studio下没找到对应文件呢,我Mac

ibaoger commented 2 months ago

proxychains -lv "%USERPROFILE%\AppData\Local\LM-Studio\LM Studio.exe" it's work for me , windows11

it reports below error message on my laptop (windwos 10)

[PID18992] [W] 2024/03/04 11:14:18 GetThreadContext() Failed: The parameter is incorrect.(87) [PID18992] [E] 2024/03/04 11:14:18 Injecting WINPID 20612 Error: The parameter is incorrect.(87) [I] 2024/03/04 11:14:23 All Windows descendant process exited. [I] 2024/03/04 11:14:23 Master exiting

sorry my bad,

proxychains -lv "%USERPROFILE%\AppData\Local\LM-Studio\app-0.2.16\LM Studio.exe"

should care about folder name everytime when update.

感谢,在 Win10 系统下测试成功

这里手动指定了配置文件的路径,LM Studio 版本为 0.2.20 proxychains -f "%USERPROFILE%\proxychains-windows\proxychains.conf" -lv "%USERPROFILE%\AppData\Local\LM-Studio\app-0.2.20\LM Studio.exe"

zhutoutoutousan commented 2 months ago

proxychains -lv "%USERPROFILE%\AppData\Local\LM-Studio\LM Studio.exe" it's work for me , windows11

it reports below error message on my laptop (windwos 10)

[PID18992] [W] 2024/03/04 11:14:18 GetThreadContext() Failed: The parameter is incorrect.(87) [PID18992] [E] 2024/03/04 11:14:18 Injecting WINPID 20612 Error: The parameter is incorrect.(87) [I] 2024/03/04 11:14:23 All Windows descendant process exited. [I] 2024/03/04 11:14:23 Master exiting

sorry my bad, proxychains -lv "%USERPROFILE%\AppData\Local\LM-Studio\app-0.2.16\LM Studio.exe" should care about folder name everytime when update.

感谢,在 Win10 系统下测试成功

这里手动指定了配置文件的路径,LM Studio 版本为 0.2.20 proxychains -f "%USERPROFILE%\proxychains-windows\proxychains.conf" -lv "%USERPROFILE%\AppData\Local\LM-Studio\app-0.2.20\LM Studio.exe"

Also works for Win 11 23H2

gayshub commented 2 months ago

Mac下可以直接修改model-catalog.json的downloadUrl 为镜像地址可以正常下载,具体文件位置Mac下在 ~/Library/Application Support/LM Studio/,windows上可能在C:\Users\AppData\Local,windows 我没有验证,大家自行摸索一下;需要注意的是,应用关闭后重新打开是会重新下载这个文件,修改会被覆盖,需要重新替换...

It works with macos, replace huggingface.co to hf-mirror.com with vim in model-catalog.json of ~/Library/Application\ Support/LM\ Studio, then clear your tasks and restart LM studio

steezer commented 1 month ago

目前最新版本(版本0.2.24)这样修改已经没用了,模型下载地址 "https://huggingface.co/" 已经写入到了程序里面。不过程序是用electron+webpack开发,安装后的程序文件在 "/Applications/LM\ Studio.app/Contents/Resources/app/.webpack" 路径下,可以在此文件夹搜索 "https://huggingface.co" ,然后批量替换为 "https://hf-mirror.com"

jfhyang commented 1 month ago

目前最新版本(版本0.2.24)这样修改已经没用了,模型下载地址 "https://huggingface.co/" 已经写入到了程序里面。不过程序是用electron+webpack开发,安装后的程序文件在 "/Applications/LM\ Studio.app/Contents/Resources/app/.webpack" 路径下,可以在此文件夹搜索 "https://huggingface.co" ,然后批量替换为 "https://hf-mirror.com"

运行前需要清理一下~/Library/Application Support/LM Studio里旧数据文件

yf94453 commented 1 month ago

win下修改后清理%APPDATA%\LM Studio可以

EricXZPan commented 1 week ago

STILL got network issue in Win11. I downloaded proxychains for win, update the conf file for my local socks5 proxy. After run the command, I can see the app log and got network issue for searching the models. Is that mean 0.2.25 version can't consume the Win11 system proxy for all its network connections?

Any other approach can solve the network issue to huggingface.co?