Description
opencode 1.18.11 中使用内置 opencode-go provider(OpenCode Zen Go,https://opencode.ai/zen/go/v1)时:
- TUI 发送消息后无任何输出、无报错,会话一直无响应
opencode run --model opencode-go/deepseek-v4-flash "hi" → 只打印 > build · deepseek-v4-flash 头,exit 0,无内容输出
- 同机器上内置
deepseek provider 正常工作
Environment
- opencode 1.18.11(官方二进制,SHA 已验证)
- Debian 12 / Ubuntu,x86_64
- Network: machine has an IPv6 address, but the IPv6 route to Cloudflare (opencode.ai) is broken (IPv6 direct connection fails)
Debug findings
- Direct
curl / node fetch calls to https://opencode.ai/zen/go/v1/chat/completions → all work fine (curl has happy-eyeballs and falls back to IPv4)
- Request capture confirms opencode sends correct params (model, key)
- Key difference found: opencode's bundled bun fetch resolves the DNS to IPv6 and connects over IPv6, but on this machine IPv6 to Cloudflare is unreachable → connection established but stream data never arrives → empty output / hang
- The same opencode works perfectly on another machine without IPv6 (phone Termux environment)
Verification
After disabling IPv6 system-wide (net.ipv6.conf.all.disable_ipv6=1), native opencode-go immediately works again — all models reply correctly.
Root cause
opencode's bundled runtime (bun fetch) has no happy-eyeballs / IPv4 fallback: when IPv6 is unavailable, it waits forever instead of falling back to IPv4.
Suggested fix
Implement happy-eyeballs (RFC 6555) dual-stack fallback in the bundled runtime: if the IPv6 connection fails or stalls, automatically fall back to IPv4 instead of waiting indefinitely.
Plugins
none
OpenCode version
1.18.11
Steps to reproduce
- Configure
opencode-go provider in auth.json with a valid API key
- Ensure the machine has an IPv6 address but broken IPv6 connectivity to Cloudflare (e.g. home broadband with unreachable IPv6 route)
- Run
opencode run --model opencode-go/deepseek-v4-flash "hi" → prints only the > build header, exits 0 with no output
- Control:
opencode run --model deepseek/deepseek-v4-flash "hi" works fine
Screenshot and/or share link
No response
Operating System
debian12
Terminal
bash
Description
opencode 1.18.11 中使用内置
opencode-goprovider(OpenCode Zen Go,https://opencode.ai/zen/go/v1)时:opencode run --model opencode-go/deepseek-v4-flash "hi"→ 只打印> build · deepseek-v4-flash头,exit 0,无内容输出deepseekprovider 正常工作Environment
Debug findings
curl/node fetchcalls tohttps://opencode.ai/zen/go/v1/chat/completions→ all work fine (curl has happy-eyeballs and falls back to IPv4)Verification
After disabling IPv6 system-wide (
net.ipv6.conf.all.disable_ipv6=1), nativeopencode-goimmediately works again — all models reply correctly.Root cause
opencode's bundled runtime (bun fetch) has no happy-eyeballs / IPv4 fallback: when IPv6 is unavailable, it waits forever instead of falling back to IPv4.
Suggested fix
Implement happy-eyeballs (RFC 6555) dual-stack fallback in the bundled runtime: if the IPv6 connection fails or stalls, automatically fall back to IPv4 instead of waiting indefinitely.
Plugins
none
OpenCode version
1.18.11
Steps to reproduce
opencode-goprovider inauth.jsonwith a valid API keyopencode run --model opencode-go/deepseek-v4-flash "hi"→ prints only the> buildheader, exits 0 with no outputopencode run --model deepseek/deepseek-v4-flash "hi"works fineScreenshot and/or share link
No response
Operating System
debian12
Terminal
bash