Use max retries 3 when there's no backup clients (#339)

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
This commit is contained in:
Will Chenandcubic-dev-ai[bot] authored and GitHub committed 2025-06-09 13:43:54 -07:00
1 parent 91cfbbe36e
commit 1a39238ecf
1 file changed
+1 -1
+1 -1
View File
@@ -60,7 +60,7 @@ export function streamTextWithBackup(params: StreamTextWithBackupParams): {
);
const { textStream } = streamText({
...rest,
maxRetries: 0,
maxRetries: i === modelClients.length - 1 ? 3 : 0,
model: currentModelClient.model,
abortSignal: attemptAbort.signal,
onError: (error) => {