fix(models): retry timeout errors by default
This commit is contained in:
@@ -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', () => {
|
||||
|
||||
@@ -26,9 +26,6 @@ export const DEFAULT_RETRY_CONFIG: RetryConfig = {
|
||||
'context_length_exceeded',
|
||||
'content_policy',
|
||||
'does not support',
|
||||
'timeout',
|
||||
'timed out',
|
||||
'request aborted',
|
||||
],
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user