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
OpenCode Go: "socket connection was closed unexpectedly" / "unknown certificate verification error" on all models #42479
I'm currently unable to use any model through the OpenCode Go provider.
The issue affects multiple models, not just DeepSeek. For example:
deepseek-v4-flash → socket connection was closed unexpectedly
gpt-5.6-luna → socket connection was closed unexpectedly
gpt-5.6-luna also intermittently returns "unknown certificate verification error"
The relevant error from the OpenCode log is:
AI_APICallError: Cannot connect to API: The socket connection was closed unexpectedly. For more information, pass verbose: true in the second argument to fetch()
I also got this more specific error:
Error: unknown certificate verification error
This happens consistently with the opencode-go provider.
I tested HTTPS connectivity to opencode.ai directly using curl, and the connection succeeds with HTTP/2 200, so general HTTPS/TLS connectivity from my Mac appears to be working.
There are also no proxy-related environment variables configured.
Plugins
None
OpenCode version
1.18.18
Steps to reproduce
Open OpenCode 1.18.18.
Use the OpenCode Go provider.
Select any available model (tested with deepseek-v4-flash and gpt-5.6-luna).
Send any prompt.
The request fails with:
"Cannot connect to API: The socket connection was closed unexpectedly"
Retrying eventually produces:
"unknown certificate verification error"
If your issue is distinct (e.g., specific to a particular model or a regression in a specific version), please add details that differentiate it from the above.
Thanks for the references. I can confirm this is happening on OpenCode v1.18.18 with the OpenCode Go provider and affects multiple models, including deepseek-v4-flash and gpt-5.6-luna.
The two errors I consistently see are:
Cannot connect to API: The socket connection was closed unexpectedly
unknown certificate verification error
I also verified that there are no proxy environment variables configured, and a direct HTTPS request to https://opencode.ai succeeds with HTTP/2 200 from Cloudflare.
Could this be caused by high demand or capacity issues on the OpenCode Go backend?
I just tested MiniMax M3 through the same opencode-go provider and it works fine, while DeepSeek V4 Flash and GPT-5.6 Luna consistently fail with the socket/certificate errors.
Is there currently any known increased traffic, capacity issue, or degradation affecting these models?
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.
Activity
github-actions commentedon Aug 14, 2026
This issue might be a duplicate of existing issues. Please check:
If your issue is distinct (e.g., specific to a particular model or a regression in a specific version), please add details that differentiate it from the above.
AlexPrincipal commentedon Aug 14, 2026
Thanks for the references. I can confirm this is happening on OpenCode v1.18.18 with the OpenCode Go provider and affects multiple models, including deepseek-v4-flash and gpt-5.6-luna.
The two errors I consistently see are:
I also verified that there are no proxy environment variables configured, and a direct HTTPS request to https://opencode.ai succeeds with HTTP/2 200 from Cloudflare.
Relevant log:
providerID=opencode-go
modelID=gpt-5.6-luna
error="Error: unknown certificate verification error"
and:
providerID=opencode-go
modelID=deepseek-v4-flash
error="AI_APICallError: Cannot connect to API: The socket connection was closed unexpectedly..."
I'm happy to provide any additional logs or diagnostics needed. Thanks!
AlexPrincipal commentedon Aug 14, 2026
Could this be caused by high demand or capacity issues on the OpenCode Go backend?
I just tested MiniMax M3 through the same
opencode-goprovider and it works fine, while DeepSeek V4 Flash and GPT-5.6 Luna consistently fail with the socket/certificate errors.Is there currently any known increased traffic, capacity issue, or degradation affecting these models?
thdxr commentedon Oct 11, 2026
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (
opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊