mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-11 22:53:00 +00:00
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) <noreply@anthropic.com>
This commit is contained in:
parent
0acda783b1
commit
5d3a2d3cfa
1 changed files with 4 additions and 3 deletions
|
|
@ -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(),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue