From 68765214b333a9294e55b7b7c0bd200b93fdd2c8 Mon Sep 17 00:00:00 2001 From: Michael Bolin Date: Sat, 27 Sep 2025 07:54:32 -0700 Subject: [PATCH] fix: remove default timeout of 30s in the proxy (#4336) This is likely the reason that I saw some conversations "freeze up" when using the proxy. Note the client in `core` does not specify a timeout when making requests to the Responses API, so the proxy should not, either. --- codex-rs/responses-api-proxy/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/codex-rs/responses-api-proxy/src/lib.rs b/codex-rs/responses-api-proxy/src/lib.rs index 600a8d6c..59c8510b 100644 --- a/codex-rs/responses-api-proxy/src/lib.rs +++ b/codex-rs/responses-api-proxy/src/lib.rs @@ -6,6 +6,7 @@ use std::net::TcpListener; use std::path::Path; use std::path::PathBuf; use std::sync::Arc; +use std::time::Duration; use anyhow::Context; use anyhow::Result; @@ -62,6 +63,8 @@ pub fn run_main(args: Args) -> Result<()> { .map_err(|err| anyhow!("creating HTTP server: {err}"))?; let client = Arc::new( Client::builder() + // Disable reqwest's 30s default so long-lived response streams keep flowing. + .timeout(None::) .build() .context("building reqwest client")?, );