pub struct HttpStackConfig {
pub total_timeout: Option<Duration>,
pub transport_retries: u8,
pub initial_backoff: Duration,
pub user_agent: Option<String>,
pub proxy: ProxyConfig,
}Expand description
HTTP stack configuration.
Default::default() provides recommended values: total_timeout = 600s,
transport_retries = 2, initial_backoff = 200ms, user_agent = None
(compile-time default), proxy = ProxyConfig::FromEnv.
Fields§
§total_timeout: Option<Duration>Total timeout for a single request. None means no limit. For SSE streaming
responses, the timer starts after the first byte arrives and continues until the
stream ends — the default of 600s covers the maximum reasonable duration for
Anthropic extended thinking.
transport_retries: u8Maximum number of transport error retries (excluding the initial attempt). 0
disables the retry layer. Only retries transport-level jitter (DNS / TCP / TLS /
hyper IO); any HTTP status code is treated as “success” and passed through —
business-level retries are handled in the turn loop.
initial_backoff: DurationInitial backoff for retries. Each retry multiplies by 2, adds ±25% jitter, and caps at 30s.
user_agent: Option<String>User-Agent header value. When None, uses the compile-time default
(defect-http/{version} ({git_sha[..8]})).
proxy: ProxyConfigProxy configuration.
Trait Implementations§
Source§impl Clone for HttpStackConfig
impl Clone for HttpStackConfig
Source§fn clone(&self) -> HttpStackConfig
fn clone(&self) -> HttpStackConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more