Files
codex/codex-rs/http-client
Michael Bolin 9078e32371 Add a route-aware HTTP client pool (#34447)
## 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
2026-07-21 02:37:23 +00:00
..

codex-http-client

Low-level HTTP transport shared by Codex crates.

  • Defines the request, response, streaming, and transport types used for outbound HTTP calls.
  • Owns the reqwest implementation, custom CA handling, and ChatGPT Cloudflare cookie policy.
  • Resolves system, PAC/WPAD, environment, and direct proxy routes for supported clients.

Higher-level retry, SSE, and request telemetry policy remains in codex-client.