Connection error with remote WSL
Which API Provider are you using?
Anthropic
Which Model are you using?
Claude 3.5 Sonnet
What happened?
cline cant connect to Claude 3.5 when I use it on vscode remote WSL , but it worked with host Windows. And WSL consle can connect to Claude 3.5 Independently with the same API key
Steps to reproduce
1.chose Remote Explorer 2. connect with my WSL Ubuntu 3.
Relevant API REQUEST output
No response
Additional context
I also encountered the same issue. When using WSL2 with OpenAI compatible (x AI / Google Gemini) or Google Gemini, a connection error occurs, but it works normally in Windows
Similar issue. Ollama running on the windows host, project is in WSL. Tried disabling windows firewall, no luck.
change WSL networkMode to mirrored.
change WSL networkMode to mirrored.
thanks π but how it worked before π€
note: switched back to nat and it works π€―
change WSL networkMode to mirrored.
thanks π but how it worked before π€
note: switched back to
natand it works π€―
one case isοΌ use a proxy in host windows(eg: clash), and it will effect cline request in WSL. (only effect cline, continue.dev works well......................)
change WSL networkMode to mirrored.
According to your hint, I asked AI to tell me the detailed solution.
Then I do that and it really works!
What surprised me is this makes many similar extension available under WSL in VSCode, such as MarsCode, Copilot and Codeium. Now I can happily work and code just in VSCode under powerful AI assistance without switching to Cursor or Windsurf.
I use proxy solve it . vim ~/.bashrc then add code to the end # get Host IP WINDOWS_IP=$(ip route | grep default | awk '{print $3}') PROXY_HTTP="http://${WINDOWS_IP}:7890"
# set env export http_proxy="${PROXY_HTTP}" export https_proxy="${PROXY_HTTP}"