diff --git a/packages/core/src/core/geminiChat.test.ts b/packages/core/src/core/geminiChat.test.ts index 8a6b3f8bc8..9796e85ccd 100644 --- a/packages/core/src/core/geminiChat.test.ts +++ b/packages/core/src/core/geminiChat.test.ts @@ -1315,11 +1315,11 @@ describe('GeminiChat', () => { } }).rejects.toThrow(InvalidStreamError); - // Should be called 2 times (initial + 1 retry) + // Should be called 3 times (initial + 2 retries) expect(mockContentGenerator.generateContentStream).toHaveBeenCalledTimes( - 2, + 3, ); - expect(mockLogContentRetry).toHaveBeenCalledTimes(1); + expect(mockLogContentRetry).toHaveBeenCalledTimes(2); expect(mockLogContentRetryFailure).toHaveBeenCalledTimes(1); // History should still contain the user message. diff --git a/packages/core/src/core/geminiChat.ts b/packages/core/src/core/geminiChat.ts index c9cb6cf8f2..5300bfdfbb 100644 --- a/packages/core/src/core/geminiChat.ts +++ b/packages/core/src/core/geminiChat.ts @@ -86,8 +86,8 @@ interface ContentRetryOptions { } const INVALID_CONTENT_RETRY_OPTIONS: ContentRetryOptions = { - maxAttempts: 2, // 1 initial call + 1 retry - initialDelayMs: 500, + maxAttempts: 3, // 1 initial call + 2 retries + initialDelayMs: 1000, }; export const SYNTHETIC_THOUGHT_SIGNATURE = 'skip_thought_signature_validator';