Skip to content

Opencode not respecting NO_PROXY variable #8822

@anand2312

Description

@anand2312

Description

Running behind a corporate proxy, I have set the HTTP_PROXY, HTTPS_PROXY and NO_PROXY variables as described here

HTTP_PROXY=http://proxy.org.com
HTTPS_PROXY=http://proxy.org.com
NO_PROXY=*.org.com,localhost,127.0.0.1

I need the proxy variables set so that the global npm registry is accessible to install opencode's necessary plugins from, BUT I need opencode to connect to a local LiteLLM proxy as the LLM provider, running on (say) litellm.org.com:4000. My org requires that internal traffic should not be sent through the proxy, which is why I have *.org.com in my NO_PROXY. This setup works for every other application I use (including claude code)

Opencode seems to be routing the requests to LiteLLM also through the proxy, the log files include the error message that my org's proxy returns when you try reaching some internal endpoint through it.
Removing the HTTP_PROXY/HTTPS_PROXY in turn ends up working, but is just a band-aid fix

Plugins

No response

OpenCode version

1.1.23

Steps to reproduce

No response

Screenshot and/or share link

2026-01-16T063149.log

log including the error from my proxy server

Proxy variables set:

PS C:\Users\user> Get-ChildItem Env:*_PROXY

Name                           Value
----                           -----
NO_PROXY                       *.org.com,localhost,127.0.0.1
HTTPS_PROXY                    http://proxy.org.com:80
ALL_PROXY                      http://proxy.org.com:80
HTTP_PROXY                    http://proxy.org.com:80

Operating System

Windows 11

Terminal

Windows Terminal, Alacritty

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingwindows

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions