On macOS, an app without Local Network permission gets "[Errno 65] No route
to host" for every host on the local network, surfaced by the OpenAI client as
a bare "Connection error." Some launchers (Comfy Desktop 1.1.3) never request
the permission, so it cannot be granted in System Settings at all.
- network.py: detect the denial (darwin + EHOSTUNREACH anywhere in the
exception chain + a LAN target) and raise LocalNetworkBlockedError with a
fix built from the user's own server_url. Wired into Connect, the
/lmstudio/test and /lmstudio/models routes, Text Gen and Image To Text.
Other errors and platforms are untouched.
- scripts/lan_forward.py: stdlib-only relay from 127.0.0.1 (loopback is
exempt) to the LM Studio host. --target is required; no built-in address.
Probes the target on startup and explains failures.
- README: troubleshooting section. launchd agents are blocked the same way,
so the start-at-login recipe is a .command file opened by Terminal.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>