fix(core): plumb max attempts for retry to generate options in baseLLMClient (#9518)

This commit is contained in:
anthony bushong
2025-09-24 15:25:15 -07:00
committed by GitHub
parent 05c962af1f
commit 8abe7e151c
5 changed files with 70 additions and 1 deletions
+4
View File
@@ -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,