mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-13 15:40:57 -07:00
feat(core): increase thought signature retry resilience
maxAttempts 2→3, initialDelayMs 500→1000 for "thought signature chunk" errors to better handle transient API flakes.
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user