Fix child pane reopening and overload retries

This commit is contained in:
2026-08-26 01:43:37 -05:00
parent fbfb33d8f4
commit 92ab03be07
5 changed files with 168 additions and 23 deletions
@@ -14,3 +14,16 @@ fn flattened_sse_http_client_error_is_recoverable_transport() {
assert_eq!(mapped.kind, AgentErrorKind::Transport);
assert!(mapped.recoverable);
}
#[test]
fn flattened_streamed_provider_overload_is_recoverable() {
let error = CompletionError::ProviderError(
r#"{"type":"error","error":{"type":"service_unavailable_error","code":"server_is_overloaded","message":"Our servers are currently overloaded. Please try again later."}}"#
.to_string(),
);
let mapped = map_completion_error(error);
assert_eq!(mapped.kind, AgentErrorKind::Provider);
assert!(mapped.recoverable);
}