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
{{ message }}
Repository navigation
ECONNRESET on built-in Zen provider — works with VPN, fails without (same network, no rate-limit JSON) #60422
Getting a consistent ECONNRESET when using the built-in anonymous Zen provider from my regular network connection. Using a VPN (different exit IP) resolves the issue immediately — same opencode install, same config, same network, only the IP changes.
Error:
ECONNRESET: The socket connection was closed unexpectedly. For more information, pass verbose: true in the second argument to fetch()
Key observation
This is a raw TCP-level connection reset, not the usual rate-limit response (429 FreeUsageLimitError JSON). The connection drops before any HTTP response is returned. This suggests a block/reset happening at the edge/CDN level in front of the Zen endpoint, not an application-level rate limit.
What I've ruled out
PC reboot — no change
DNS flush/reset, manually set DNS to 1.1.1.1 — no change
No leftover VPN virtual adapters (checked Device Manager / ncpa.cpl)
No hosts file entries pointing to opencode.ai
Network firewall profile set to Private
Issue reproduces consistently on this network/IP, disappears immediately when VPN is enabled (new exit IP)
Environment
OpenCode version: 2.1.2
Provider: built-in free tier
OS: Windows 10
ISP: Rostelecom (Russia), DHCP
Network: home connection, no corporate proxy
Expected behavior
Either the request succeeds, or a clear error (e.g. rate limit / regional restriction) is returned instead of a raw socket reset.
Plugins
lean-context.js ponytail.js
OpenCode version
2.1.2
Steps to reproduce
Use opencode with the built-in free Zen provider from a Rostelecom (Russia) IP
Send any message
Observe ECONNRESET before any response is returned
Enable VPN (different exit country/IP), retry — works immediately
Thanks for the detailed report and the list of things you've already ruled out.
I think this is a duplicate of #60399. That report is from the same ISP (Rostelecom) on Windows 10, using the free Zen models. Requests fail without a VPN and work immediately with one, and the logs there show the same ECONNRESET: The socket connection was closed unexpectedly error. The likely cause found there is that the ISP's traffic filtering (DPI) drops or resets the TLS handshake. OpenCode sends a large TLS ClientHello, which is split across two TCP packets, while curl on the same IP works because its handshake is much smaller. That would explain why the connection is reset before any HTTP response arrives, and suggests the Zen endpoint itself isn't blocking you.
Possible duplicates and related issues, ordered by likelihood:
The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different. If you can add anything to #60399, for example whether curl https://opencode.ai/inference/v1/models works for you without the VPN, please post it there.
Same condition, now measured — duplicate of #60399. This is not an OpenCode defect: the connection is dropped during the TLS handshake, before any HTTP request, and the same failure hits Chrome/Edge as well.
All reports so far are Rostelecom (Irkutsk ×2, Perm, Ulyanovsk), but that reflects provider size rather than scope: this filtering is mandatory across Russian operators, so other ISPs are likely just behind.
Reproducible on any affected line: curl.exe -sS -o NUL -w "%{http_code}" https://opencode.ai/inference/v1/models returns 200 while the browser and Bun-based clients fail against the same host at the same moment. Hello-level A/B in #60399: PQ key share times out 3/3, classical X25519 handshakes 3/3 against the same host and IP.
Workaround: add the affected hostname to your DPI-bypass hostlist — with opencode.ai listed it works on a direct connection with no VPN.
Closing this as a duplicate of #60399, since we haven't heard back that your problem is different. That issue has the same setup (Rostelecom connection on Windows, free Zen models, fails without a VPN, works with one) and the same ECONNRESET error. The likely cause is the ISP's traffic filtering dropping OpenCode's TLS handshake. It has already been reproduced there, so please follow #60399 for updates and add anything new there, for example whether curl https://opencode.ai/inference/v1/models works for you without the VPN.
If your problem turns out to be different, reply here explaining how and we can reopen this. Thanks again for the detailed report.
Activity
opencodejr commentedon Oct 30, 2026
Thanks for the detailed report and the list of things you've already ruled out.
I think this is a duplicate of #60399. That report is from the same ISP (Rostelecom) on Windows 10, using the free Zen models. Requests fail without a VPN and work immediately with one, and the logs there show the same
ECONNRESET: The socket connection was closed unexpectedlyerror. The likely cause found there is that the ISP's traffic filtering (DPI) drops or resets the TLS handshake. OpenCode sends a large TLS ClientHello, which is split across two TCP packets, whilecurlon the same IP works because its handshake is much smaller. That would explain why the connection is reset before any HTTP response arrives, and suggests the Zen endpoint itself isn't blocking you.Possible duplicates and related issues, ordered by likelihood:
The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different. If you can add anything to #60399, for example whether
curl https://opencode.ai/inference/v1/modelsworks for you without the VPN, please post it there.yaqqpire commentedon Oct 30, 2026
Same symptom, same ISP (Rostelecom, Russia), Windows 10.
Fails consistently without VPN, works immediately with VPN (new exit IP).
curl https://opencode.ai/inference/v1/modelswithout VPN:successfully ({"object":"list","data":[{"id":"big-pickle","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"beam-free","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"flint-40b-free","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"mimo-v2.6-flash-free","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"nemotron-3.5-super-vl-free","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"nemotron-3.5-lightning-free","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"jev-1.13-free","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"deepseek-v4.1-flash-free","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"glm-5.3-flash-free","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"claude-fable-5","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"jev-1.13","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"claude-fable-5-1","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"claude-haiku-4-5","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"claude-haiku-5-5","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"claude-opus-4-5","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"claude-opus-4-6","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"claude-opus-4-7","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"claude-opus-4-8","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"claude-opus-5","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"claude-opus-5-5","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"claude-sonnet-4-5","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"claude-sonnet-4-6","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"claude-sonnet-5","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"claude-sonnet-5-5","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"deepseek-v4.1-flash","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"deepseek-v4-pro","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"gemini-3-flash","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"gemini-3.1-pro","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"gemini-3.5-flash","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"gemini-3.5-flash-lite","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"gemini-3.6-flash","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"gemini-3.7-flash","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"gemini-3.8-flash","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"gemini-4-argon","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"glm-5","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"glm-5.1","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"glm-5.2","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"glm-5.3","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"glm-5.3-flash","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"gpt-5","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"gpt-5-codex","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"gpt-5-nano","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"gpt-5.1","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"gpt-5.1-codex","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"gpt-5.1-codex-max","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"gpt-5.1-codex-mini","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"gpt-5.2","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"gpt-5.2-codex","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"gpt-5.3-codex","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"gpt-5.3-codex-spark","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"gpt-5.4","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"gpt-5.4-mini","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"gpt-5.4-nano","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"gpt-5.4-pro","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"gpt-5.5","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"gpt-5.5-pro","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"gpt-5.6-luna","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"gpt-5.6-sol","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"gpt-6-astra","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"gpt-6-sol","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"gpt-6.1-sol","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"gpt-6-luna","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"gpt-5.6-terra","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"grok-4.5","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"grok-4.6","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"grok-4.7","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"grok-build-0.1","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"kimi-k2.5","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"kimi-k2.6","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"kimi-k2.7-code","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"kimi-k3","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"minimax-m2.5","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"minimax-m2.7","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"minimax-m3","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"muse-spark-1.2","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"muse-spark-1.3","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"muse-wonder-1.0","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"mistral-large-4","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"qwen3.5-plus","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"qwen3.6-plus","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"qwen3.8-flash","object":"model","created":1793325495,"owned_by":"opencode"},{"id":"qwen3.8-max","object":"model","created":1793325495,"owned_by":"opencode"}]}
)
OpenCode version: 2.1.2
a1elen commentedon Oct 30, 2026
same isp, same problem
MLGSW4G commentedon Oct 30, 2026
Same condition, now measured — duplicate of #60399. This is not an OpenCode defect: the connection is dropped during the TLS handshake, before any HTTP request, and the same failure hits Chrome/Edge as well.
All reports so far are Rostelecom (Irkutsk ×2, Perm, Ulyanovsk), but that reflects provider size rather than scope: this filtering is mandatory across Russian operators, so other ISPs are likely just behind.
Reproducible on any affected line:
curl.exe -sS -o NUL -w "%{http_code}" https://opencode.ai/inference/v1/modelsreturns 200 while the browser and Bun-based clients fail against the same host at the same moment. Hello-level A/B in #60399: PQ key share times out 3/3, classicalX25519handshakes 3/3 against the same host and IP.Workaround: add the affected hostname to your DPI-bypass hostlist — with
opencode.ailisted it works on a direct connection with no VPN.Sankyuubigan commentedon Oct 30, 2026
ECONNRESET: The socket connection was closed unexpectedly. For more information, pass
verbose: truein the second argument to fetch()Domru provider
Sankyuubigan commentedon Oct 30, 2026
The VPN doesn’t help. I’ve tried different countries.
opencodejr commentedon Oct 31, 2026
Closing this as a duplicate of #60399, since we haven't heard back that your problem is different. That issue has the same setup (Rostelecom connection on Windows, free Zen models, fails without a VPN, works with one) and the same
ECONNRESETerror. The likely cause is the ISP's traffic filtering dropping OpenCode's TLS handshake. It has already been reproduced there, so please follow #60399 for updates and add anything new there, for example whethercurl https://opencode.ai/inference/v1/modelsworks for you without the VPN.If your problem turns out to be different, reply here explaining how and we can reopen this. Thanks again for the detailed report.