fix(quota): normalize DeepSeek timeout errors

This commit is contained in:
Bohdan Triapitsyn
2026-08-03 18:42:31 +03:00
parent 1cc5cfedbb
commit e4fddabb19
4 changed files with 36 additions and 2 deletions
+3 -1
View File
@@ -2285,7 +2285,9 @@ const fetchDeepseekQuota = async (): Promise<ProviderResult> => {
usage: { windows },
});
} catch (error) {
const isTimeout = error instanceof DOMException && error.name === 'AbortError' && timeoutSignal.aborted;
const isTimeout = error instanceof DOMException && (
error.name === 'TimeoutError' || (error.name === 'AbortError' && timeoutSignal.aborted)
);
const isParseError = error instanceof SyntaxError;
return buildResult({
providerId: 'deepseek',