From 5d3a2d3cfa229e6abeda6b3216b71dd21dc5f4c3 Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Mon, 23 Mar 2026 12:56:22 -0400 Subject: [PATCH] Make RequestTimeout non-retryable by default Aligns with spec update: 408 timeout errors are now non-retryable by default. Applications can opt in to timeout retries via custom retry logic. RequestTimeout remains failover-eligible since a different provider may not share the same timeout. Co-Authored-By: Claude Opus 4.6 (1M context) --- lib/crates/fabro-llm/src/error.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/crates/fabro-llm/src/error.rs b/lib/crates/fabro-llm/src/error.rs index 02e42c995..2f29b7b83 100644 --- a/lib/crates/fabro-llm/src/error.rs +++ b/lib/crates/fabro-llm/src/error.rs @@ -103,7 +103,8 @@ impl SdkError { | Self::NoObjectGenerated { .. } | Self::Abort { .. } | Self::Configuration { .. } - | Self::UnsupportedToolChoice { .. } => false, + | Self::UnsupportedToolChoice { .. } + | Self::RequestTimeout { .. } => false, _ => true, } } @@ -155,7 +156,7 @@ impl SdkError { Self::Provider { kind: ProviderErrorKind::QuotaExceeded, .. - } + } | Self::RequestTimeout { .. } ) } @@ -333,7 +334,7 @@ mod tests { let timeout = SdkError::RequestTimeout { message: "timed out".into(), }; - assert!(timeout.retryable()); + assert!(!timeout.retryable()); let network = SdkError::Network { message: "connection refused".into(),