fix: restore coding history and quota feedback

This commit is contained in:
inman
2026-09-01 11:46:04 +08:00
parent 38f85f6b5e
commit d523b72cf8
14 changed files with 480 additions and 49 deletions

View File

@@ -86,7 +86,8 @@ function getForwardedOneApiStatus(status: number, bodyText: string): number {
if (status === 502 && isAIGatewayUserContextMissing(bodyText)) {
return 401;
}
if (status === 429 && getAIGatewayErrorKind(bodyText) === 'quota_exhausted') {
if ((status === 403 || status === 429)
&& getAIGatewayErrorKind(bodyText) === 'quota_exhausted') {
return 402;
}
if (status === 429 && isAIGatewayUpstreamSaturated(bodyText)) {