fix(models): retry timeout errors by default

This commit is contained in:
William Valentin
2026-02-15 22:06:30 -08:00
parent 2cdfb66071
commit 7877a1bcc9
4 changed files with 15 additions and 5 deletions
+2 -2
View File
@@ -8,9 +8,9 @@ describe('isRetryable', () => {
expect(isRetryable(error, DEFAULT_RETRY_CONFIG.nonRetryablePatterns)).toBe(true);
});
it('returns false for timeout errors', () => {
it('returns true for timeout errors (transient)', () => {
const error = new Error('Request timed out after 20000ms');
expect(isRetryable(error, DEFAULT_RETRY_CONFIG.nonRetryablePatterns)).toBe(false);
expect(isRetryable(error, DEFAULT_RETRY_CONFIG.nonRetryablePatterns)).toBe(true);
});
it('returns false for authentication errors', () => {
-3
View File
@@ -26,9 +26,6 @@ export const DEFAULT_RETRY_CONFIG: RetryConfig = {
'context_length_exceeded',
'content_policy',
'does not support',
'timeout',
'timed out',
'request aborted',
],
};