{"record":{"id":"1546abe8fa49a7b7","repo":"diegosouzapw/OmniRoute","slug":"proxy-assigned-unavailable","errorCode":"PROXY_ASSIGNED_UNAVAILABLE","errorMessage":"PROXY_ASSIGNED_UNAVAILABLE: assigned proxy is inactive/unreachable; refusing to egress on a direct connection","messagePattern":"PROXY_ASSIGNED_UNAVAILABLE: assigned proxy is inactive/unreachable; refusing to egress on a direct connection","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/sse/handlers/chatHelpers.ts","lineNumber":818,"sourceCode":"  apiKeyId?: string,\n  providerId?: string\n) {\n  try {\n    const resolved = await resolveProxyForConnection(connectionId, apiKeyId, providerId);\n    // #6246: a connection that resolves to DIRECT only because its assigned proxy\n    // is dead/inactive must fail closed — egressing on the real IP leaks it. Reuse\n    // the existing proxy-resolution-failure policy (blocks by default; PROXY_FAIL_OPEN\n    // opts back into direct). Explicit \"proxy off\" is not a leak (see the guard).\n    if (\n      !(resolved as { proxy?: unknown } | null)?.proxy &&\n      hasBlockingProxyAssignment(connectionId, providerId)\n    ) {\n      return decideProxyResolutionFailure(\n        Object.assign(\n          new Error(\n            \"PROXY_ASSIGNED_UNAVAILABLE: assigned proxy is inactive/unreachable; refusing to egress on a direct connection\"\n          ),\n          { code: \"PROXY_ASSIGNED_UNAVAILABLE\" }\n        )\n      );\n    }\n    return resolved;\n  } catch (proxyErr) {\n    return decideProxyResolutionFailure(proxyErr);\n  }\n}\n\n/**\n * #5217: merge a proxy the executor applied internally (captured via\n * AppliedProxySink) into the pre-execution proxyInfo so the egress logger reflects\n * the real egress. No applied proxy → proxyInfo unchanged. A pre-existing\n * non-direct level is preserved; otherwise reported as \"account\" (per-account\n * proxy, e.g. OpenCode rotation). Pure + unit-testable.\n */\nexport function applyExecutorProxyToInfo(\n  proxyInfo: { proxy?: unknown; level?: string; levelId?: string | null } | null | undefined,","sourceCodeStart":800,"sourceCodeEnd":836,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/sse/handlers/chatHelpers.ts#L800-L836","documentation":"Error \"PROXY_ASSIGNED_UNAVAILABLE: assigned proxy is inactive/unreachable; refusing to egress on a direct connection\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/sse/handlers/chatHelpers.ts:818 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}