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.
This commit is contained in:
@@ -6,6 +6,7 @@ use std::net::TcpListener;
|
|||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
use std::time::Duration;
|
||||||
|
|
||||||
use anyhow::Context;
|
use anyhow::Context;
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
@@ -62,6 +63,8 @@ pub fn run_main(args: Args) -> Result<()> {
|
|||||||
.map_err(|err| anyhow!("creating HTTP server: {err}"))?;
|
.map_err(|err| anyhow!("creating HTTP server: {err}"))?;
|
||||||
let client = Arc::new(
|
let client = Arc::new(
|
||||||
Client::builder()
|
Client::builder()
|
||||||
|
// Disable reqwest's 30s default so long-lived response streams keep flowing.
|
||||||
|
.timeout(None::<Duration>)
|
||||||
.build()
|
.build()
|
||||||
.context("building reqwest client")?,
|
.context("building reqwest client")?,
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user