Bad Gateway errors with proxy configuration #7644

Open
opened 2026-02-16 18:07:49 -05:00 by yindo · 1 comment
Owner

Originally created by @hosseinalipour on GitHub (Jan 26, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

When running opencode with HTTP/SOCKS proxy, the server returns "Bad Gateway" errors on endpoints like /config/providers, /agent, and /provider.

Environment variable OPENCODE_DISABLE_MODELS_FETCH=1 doesn't resolve the issue.

user@pc:~$ opencode
^[[I^[[I^[[I^[[IBad Gateway: /config/providers

Plugins

tui

OpenCode version

1.1.6

Steps to reproduce

  1. Configure HTTP/SOCKS proxy on system (e.g., mobile hotspot VPN)
  2. Run opencode
  3. Observe Bad Gateway errors on API endpoints

Screenshot and/or share link

No response

Operating System

Linux Mint 22.2

Terminal

No response

Originally created by @hosseinalipour on GitHub (Jan 26, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description When running opencode with HTTP/SOCKS proxy, the server returns "Bad Gateway" errors on endpoints like `/config/providers`, `/agent`, and `/provider`. Environment variable `OPENCODE_DISABLE_MODELS_FETCH=1` doesn't resolve the issue. ``` user@pc:~$ opencode ^[[I^[[I^[[I^[[IBad Gateway: /config/providers ``` ### Plugins tui ### OpenCode version 1.1.6 ### Steps to reproduce 1. Configure HTTP/SOCKS proxy on system (e.g., mobile hotspot VPN) 2. Run `opencode` 3. Observe Bad Gateway errors on API endpoints ### Screenshot and/or share link _No response_ ### Operating System Linux Mint 22.2 ### Terminal _No response_
yindo added the bug label 2026-02-16 18:07:49 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 26, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #10227: add proxy support - Enterprise proxy causing self-signed certificate errors
  • #7155: OpenCode Crashes on Launch When http_proxy Environment Variable is Set - Shows proxy-related crash issues
  • #6953: OpenCode ignores system proxy environment variables (HTTP_PROXY/HTTPS_PROXY) - Network config not respected
  • #8822: Opencode not respecting NO_PROXY variable - Selective proxy routing issues
  • #8787: OpenCode cannot start with clashX proxy enabled - Similar proxy startup failures
  • #4284: socket connection error with ProxyChains - Connection handling with proxies
  • #9956: Add SOCKS5 Proxy Support in Desktop App - SOCKS proxy feature request

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 26, 2026): This issue might be a duplicate of existing issues. Please check: - #10227: add proxy support - Enterprise proxy causing self-signed certificate errors - #7155: OpenCode Crashes on Launch When `http_proxy` Environment Variable is Set - Shows proxy-related crash issues - #6953: OpenCode ignores system proxy environment variables (HTTP_PROXY/HTTPS_PROXY) - Network config not respected - #8822: Opencode not respecting NO_PROXY variable - Selective proxy routing issues - #8787: OpenCode cannot start with clashX proxy enabled - Similar proxy startup failures - #4284: socket connection error with ProxyChains - Connection handling with proxies - #9956: Add SOCKS5 Proxy Support in Desktop App - SOCKS proxy feature request Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7644