You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The key difference in your issue (#8822) is the specific handling of the NO_PROXY environment variable for selective routing, which appears to be not respected even though standard tools handle it correctly.
Feel free to ignore if none of these address your specific case.
The fix is in packages/opencode/src/util/fetch.ts - we implement our own proxyFetch() wrapper that properly handles NO_PROXY patterns, rather than relying on Bun's native handling.
Note: This is independent of Bun's proxy handling - we explicitly parse and match NO_PROXY patterns before deciding whether to use the proxy.
Activity
github-actions commentedon Jan 16, 2026
This issue might be a duplicate of existing issues. Please check:
http_proxyEnvironment Variable is Set #7155: OpenCode Crashes on Launch Whenhttp_proxyEnvironment Variable is Set - similar proxy configuration crashThe key difference in your issue (#8822) is the specific handling of the
NO_PROXYenvironment variable for selective routing, which appears to be not respected even though standard tools handle it correctly.Feel free to ignore if none of these address your specific case.
rekram1-node commentedon Jan 26, 2026
Think this is probably a bun bug, ur using the tui right?
Thesam1798 commentedon Jan 27, 2026
Fix available in PR #10856
This issue is addressed by PR #10856 which implements proper
NO_PROXYpattern matching.Your use case:
Our implementation supports:
*.org.commatcheslitellm.org.com.org.commatches any subdomainlocalhost,127.0.0.1org.comalso matchessub.org.comThe fix is in
packages/opencode/src/util/fetch.ts- we implement our ownproxyFetch()wrapper that properly handlesNO_PROXYpatterns, rather than relying on Bun's native handling.Note: This is independent of Bun's proxy handling - we explicitly parse and match
NO_PROXYpatterns before deciding whether to use the proxy.github-actions commentedon Mar 30, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.