diegosouzapw/OmniRoute · error · Error

PROXY_ASSIGNED_UNAVAILABLE

PROXY_ASSIGNED_UNAVAILABLE

Error message

PROXY_ASSIGNED_UNAVAILABLE: assigned proxy is inactive/unreachable; refusing to egress on a direct connection

What it means

chatHelpers proxy fail-closed guard (#6246): the connection has a proxy assigned, but that proxy resolved as inactive/unreachable, so proxy resolution fell back to DIRECT — the guard refuses to egress on the real IP to avoid leaking it. Only PROXY_FAIL_OPEN can override; explicit 'proxy off' does not trigger this.

Solutions

  1. Repair or re-enable the assigned proxy
  2. Reassign a healthy proxy to the connection
  3. Set PROXY_FAIL_OPEN=true only if direct egress is acceptable
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at src/sse/handlers/chatHelpers.ts:818 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25). Data as JSON: /api/errors/1546abe8fa49a7b7. Report an issue: GitHub.

Appendix: source

Thrown at src/sse/handlers/chatHelpers.ts:818

  apiKeyId?: string,
  providerId?: string
) {
  try {
    const resolved = await resolveProxyForConnection(connectionId, apiKeyId, providerId);
    // #6246: a connection that resolves to DIRECT only because its assigned proxy
    // is dead/inactive must fail closed — egressing on the real IP leaks it. Reuse
    // the existing proxy-resolution-failure policy (blocks by default; PROXY_FAIL_OPEN
    // opts back into direct). Explicit "proxy off" is not a leak (see the guard).
    if (
      !(resolved as { proxy?: unknown } | null)?.proxy &&
      hasBlockingProxyAssignment(connectionId, providerId)
    ) {
      return decideProxyResolutionFailure(
        Object.assign(
          new Error(
            "PROXY_ASSIGNED_UNAVAILABLE: assigned proxy is inactive/unreachable; refusing to egress on a direct connection"
          ),
          { code: "PROXY_ASSIGNED_UNAVAILABLE" }
        )
      );
    }
    return resolved;
  } catch (proxyErr) {
    return decideProxyResolutionFailure(proxyErr);
  }
}

/**
 * #5217: merge a proxy the executor applied internally (captured via
 * AppliedProxySink) into the pre-execution proxyInfo so the egress logger reflects
 * the real egress. No applied proxy → proxyInfo unchanged. A pre-existing
 * non-direct level is preserved; otherwise reported as "account" (per-account
 * proxy, e.g. OpenCode rotation). Pure + unit-testable.
 */
export function applyExecutorProxyToInfo(
  proxyInfo: { proxy?: unknown; level?: string; levelId?: string | null } | null | undefined,

View on GitHub (pinned to a179ffed5b)