Merge branch 'codex/20260831-fix-history-quota-errors-6c2a91e4-fix-history-quota-errors-6c2a91e4'

This commit is contained in:
inman
2026-09-01 11:46:28 +08:00
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)) {