mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-30 23:14:32 -07:00
fix(core): plumb max attempts for retry to generate options in baseLLMClient (#9518)
This commit is contained in:
@@ -74,6 +74,10 @@ export async function retryWithBackoff<T>(
|
||||
fn: () => Promise<T>,
|
||||
options?: Partial<RetryOptions>,
|
||||
): Promise<T> {
|
||||
if (options?.maxAttempts !== undefined && options.maxAttempts <= 0) {
|
||||
throw new Error('maxAttempts must be a positive number.');
|
||||
}
|
||||
|
||||
const {
|
||||
maxAttempts,
|
||||
initialDelayMs,
|
||||
|
||||
Reference in New Issue
Block a user