Skip to content

[Bug] Chat requests to LAN HTTP provider fail with EHOSTUNREACH while Test Provider succeeds #573

Description

@chilin11

What happened? / 问题描述

After updating to v0.15.0, an OpenAI-compatible provider on the local network passes “Test Provider”, but every real chat request fails with “Network error”.

The two paths behave differently: provider testing succeeds, while the agent sidecar request fails before receiving an HTTP response. Launching PI-Desktop from Terminal triggers Terminal’s Local Network permission prompt; after granting it, chat requests work. PI-Desktop itself does not appear under System Settings → Privacy & Security → Local Network.

Steps to reproduce / 复现步骤

  1. Configure an OpenAI-compatible provider using an HTTP endpoint on the LAN.
  2. In Settings, run Test Provider; it succeeds.
  3. Start a chat using a model from that provider.
  4. The request retries and ends with Network error.
  5. Fully quit PI-Desktop.
  6. Launch /Applications/PI-Desktop.app/Contents/MacOS/PI-Desktop from Terminal.
  7. Allow Terminal local-network access when macOS prompts.
  8. Retry the same chat; it succeeds.

Expected behavior / 预期行为

Chat requests should reach the same LAN provider that passes Test Provider, regardless of whether PI-Desktop was launched from Finder or Terminal.

Actual behavior / 实际行为

When launched normally, chat requests fail after retries with NETWORK_ERROR / EHOSTUNREACH on the direct route. Test Provider still succeeds. Launching from Terminal and granting Terminal local-network permission makes chat requests work.

App version / 应用版本

0.15.0

Operating system / 操作系统

macOS

Extra environment / 其他环境信息

macOS 26.6.2, Apple Silicon (arm64), DMG installation. Network proxy mode: direct. Provider: OpenAI-compatible API over HTTP on the local LAN.

Logs / 日志

`agent.turn.failed`

- code: `NETWORK_ERROR`
- message: `Connection error.`
- networkCategory: `unreachable`
- networkCode: `EHOSTUNREACH`
- networkSyscall: `connect`
- networkRoute: `direct`
- phase: `request`
- retryAttempt: `10`

Screenshots / 截图

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions