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 Chen
2025-06-09 13:43:54 -07:00
committed by GitHub
parent 91cfbbe36e
commit 1a39238ecf

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) => {