Decouple exec-server HTTP from reqwest types (#35059)

## What changed

- Rename `ReqwestHttpClient` to `RouteAwareHttpClient` to reflect that delegated HTTP uses Codex's shared route-aware transport.
- Use `codex_http_client` response and error types plus transport-neutral `http` and `url` types, removing the exec server's direct `reqwest` dependency.

## Testing

- Cover fragment stripping and Unicode hostname normalization for delegated HTTP requests.

GitOrigin-RevId: 8b0fc60a76004feb57198bfb4afb1371c9ceb1bd
This commit is contained in:
Celia Chen
2026-07-24 00:53:05 +00:00
committed by copyberry
parent 94ebae725e
commit 09241ae4db
18 changed files with 175 additions and 64 deletions
+2 -2
View File
@@ -17,7 +17,7 @@ use codex_connectors::ConnectorRuntimeManager;
use codex_exec_server::Environment;
use codex_exec_server::EnvironmentManager;
use codex_exec_server::HttpClient;
use codex_exec_server::ReqwestHttpClient;
use codex_exec_server::RouteAwareHttpClient;
use codex_login::AuthManager;
use codex_login::CodexAuth;
use codex_protocol::capabilities::SelectedCapabilityRoot;
@@ -307,7 +307,7 @@ impl McpRuntimeContext {
}
pub(crate) fn local_http_client(&self) -> Arc<dyn HttpClient> {
Arc::new(ReqwestHttpClient::new(
Arc::new(RouteAwareHttpClient::new(
self.environment_manager.http_client_factory().clone(),
))
}