Skip to content

Add a route-aware HTTP client pool - #34447

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/a1688b64305a0bb276c371df63a039ccbe821b76
Jul 21, 2026
Merged

Add a route-aware HTTP client pool#34447
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/a1688b64305a0bb276c371df63a039ccbe821b76

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 21, 2026

Copy link
Copy Markdown

Add a route-aware HTTP client pool

Why

PAC and system-proxy resolution can select a different outbound route for each
request URL. Request creation and route selection must use the same URL while
still allowing transport clients to be reused.

What changed

  • Add RouteAwareClientPool and a request builder that resolve the outbound
    proxy route when sending each request.
  • Reuse HTTP clients by resolved route, with a bounded cache of 16 routes.
  • Preserve request tracing, optional diagnostic logging, custom CA settings,
    Cloudflare cookies, and default transport redirect behavior.
  • Export route-aware response and error types, including status, timeout, and
    connection-error helpers.

Testing

Add tests for exact URL routing, client reuse and eviction, default redirects,
and redaction of URL secrets from debug output.

## Why

PAC and system-proxy resolution can select a different outbound route for each
request URL. Request creation and route selection must use the same URL while
still allowing transport clients to be reused.

## What changed

- Add `RouteAwareClientPool` and a request builder that resolve the outbound
  proxy route when sending each request.
- Reuse HTTP clients by resolved route, with a bounded cache of 16 routes.
- Preserve request tracing, optional diagnostic logging, custom CA settings,
  Cloudflare cookies, and default transport redirect behavior.
- Export route-aware response and error types, including status, timeout, and
  connection-error helpers.

## Testing

Add tests for exact URL routing, client reuse and eviction, default redirects,
and redaction of URL secrets from debug output.

GitOrigin-RevId: a1688b64305a0bb276c371df63a039ccbe821b76
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/a1688b64305a0bb276c371df63a039ccbe821b76 branch from d9544ed to 9078e32 Compare July 21, 2026 02:37
@copyberry
copyberry Bot merged commit 9078e32 into main Jul 21, 2026
29 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/a1688b64305a0bb276c371df63a039ccbe821b76 branch July 21, 2026 02:38
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

3 participants