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:
@@ -60,7 +60,7 @@ export function streamTextWithBackup(params: StreamTextWithBackupParams): {
|
|||||||
);
|
);
|
||||||
const { textStream } = streamText({
|
const { textStream } = streamText({
|
||||||
...rest,
|
...rest,
|
||||||
maxRetries: 0,
|
maxRetries: i === modelClients.length - 1 ? 3 : 0,
|
||||||
model: currentModelClient.model,
|
model: currentModelClient.model,
|
||||||
abortSignal: attemptAbort.signal,
|
abortSignal: attemptAbort.signal,
|
||||||
onError: (error) => {
|
onError: (error) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user