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
fetch fails with EHOSTUNREACH for non-localhost addresses (Node.js v24.11.0 undici bug) #33757
Issue: Node.js fetch (undici) fails with EHOSTUNREACH for local network addresses
Title: fetch fails with EHOSTUNREACH for non-localhost addresses (Node.js v24.11.0 undici bug)
Body:
Environment
OpenCode version: 1.17.10
Node.js: v24.11.0
OS: macOS (Apple Silicon)
Provider: Custom Ollama server at http://192.168.1.250:11434/
Description
The AI SDK's HTTP calls fail with EHOSTUNREACH when connecting to a non-localhost address, even though the server is reachable via curl and Node.js require('http').
Steps to Reproduce
Configure a custom provider pointing to a local network address (e.g. http://192.168.1.250:11434/v1)
Run opencode
Select the custom provider model
Send a message
Expected
Connection succeeds and model responds.
Actual
Hangs indefinitely or fails with EHOSTUNREACH. Root cause: Node.js v24.11.0's built-in fetch (undici) has a DNS/networking bug affecting non-localhost addresses. require('http') works fine to the same address.
Workaround
None available within OpenCode. Using NODE_OPTIONS="--dns-result-order=ipv4first" does not resolve it for the AI SDK's fetch calls.
If your issue is distinct (e.g. specifically triggered by Node.js v24.11.0 rather than VPN interfaces or desktop app sandboxing), please add details clarifying the difference.
I'm running OpenCode Desktop on macOS and trying to connect to a self-hosted model (Qwen running on a local IP like 192.168.x.x)
In my case fix was to allow opencode to access local network: Open System Settings on your Mac. Navigate to Privacy & Security > Local Network. Find OpenCode in the list. Toggle the switch to ON. Restart OpenCode Desktop.
Activity
github-actions commentedon Jun 25, 2026
This issue might be a duplicate of existing issues. Please check:
192.168.x.xconnections #25908: Desktop app cannot reach LAN IP addresses - EHOSTUNREACH on all192.168.x.xconnections (same error, same macOS + custom provider setup)If your issue is distinct (e.g. specifically triggered by Node.js v24.11.0 rather than VPN interfaces or desktop app sandboxing), please add details clarifying the difference.
vasiliy-t commentedon Aug 10, 2026
I'm running OpenCode Desktop on macOS and trying to connect to a self-hosted model (Qwen running on a local IP like 192.168.x.x)
In my case fix was to allow opencode to access local network: Open System Settings on your Mac. Navigate to Privacy & Security > Local Network. Find OpenCode in the list. Toggle the switch to ON. Restart OpenCode Desktop.
github-actions commentedon Oct 11, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.