fix(core): apply retry logic to CodeAssistServer for all users (#20507)

This commit is contained in:
Bryan Morgan
2026-02-27 09:26:53 -05:00
committed by GitHub
parent 82336de7a4
commit 522e95439c
2 changed files with 58 additions and 26 deletions

View File

@@ -305,6 +305,15 @@ export class CodeAssistServer implements ContentGenerator {
responseType: 'json',
body: JSON.stringify(req),
signal,
retryConfig: {
retry: 3,
noResponseRetries: 3,
statusCodesToRetry: [
[429, 429],
[499, 499],
[500, 599],
],
},
});
return res.data;
}
@@ -352,6 +361,15 @@ export class CodeAssistServer implements ContentGenerator {
responseType: 'stream',
body: JSON.stringify(req),
signal,
retryConfig: {
retry: 3,
noResponseRetries: 3,
statusCodesToRetry: [
[429, 429],
[499, 499],
[500, 599],
],
},
});
return (async function* (): AsyncGenerator<T> {