Compare commits

...

2 Commits

Author SHA1 Message Date
continue[bot]
b510535e7c refactor: improve retry condition clarity
Make the retry logic more explicit by checking isLastAttempt instead of
redundant comparison with OVERLOADED_RETRIES. This makes it clear that
we retry on overloaded errors unless we're on the final attempt.

Co-authored-by: nate <nate@continue.dev>

Generated with [Continue](https://continue.dev)

Co-Authored-By: Continue <noreply@continue.dev>
2025-12-16 01:05:50 +00:00
continue[bot]
8b97c162ed fix: add missing cancelStream call and return for non-retryable errors
- Add cancelStream() call before showing error dialog for non-retryable errors
- Add return statement to prevent loop continuation after handling non-retryable error

Co-authored-by: nate <nate@continue.dev>

Generated with [Continue](https://continue.dev)

Co-Authored-By: Continue <noreply@continue.dev>
2025-12-09 14:06:27 +00:00

View File

@@ -42,8 +42,8 @@ export const streamThunkWrapper = createAsyncThunk<
const { parsedError, statusCode, message, modelTitle, providerName } =
analyzeError(e, selectedModel);
const shouldRetry =
isOverloadedErrorMessage(message) && attempt < OVERLOADED_RETRIES;
const isLastAttempt = attempt === OVERLOADED_RETRIES;
const shouldRetry = isOverloadedErrorMessage(message) && !isLastAttempt;
if (shouldRetry) {
await dispatch(cancelStream());
@@ -51,6 +51,7 @@ export const streamThunkWrapper = createAsyncThunk<
await new Promise((resolve) => setTimeout(resolve, delayMs));
await dispatch(cancelStream());
} else {
await dispatch(cancelStream());
dispatch(setDialogMessage(<StreamErrorDialog error={e} />));
dispatch(setShowDialog(true));
@@ -62,6 +63,7 @@ export const streamThunkWrapper = createAsyncThunk<
};
posthog.capture("gui_stream_error", errorData);
return;
}
}
}