fix: restore coding history and quota feedback
This commit is contained in:
1 parent
38f85f6b5e
commit
d523b72cf8
14 files changed
+480
-49
No files matched your search
@@ -3,8 +3,10 @@ export type AIGatewayErrorKind = 'quota_exhausted' | 'authentication_invalid';
|
||||
export function isTokenBalanceExhausted(message: string | null | undefined): boolean {
|
||||
const normalized = message?.trim().toLowerCase() ?? '';
|
||||
return normalized.includes('token_balance_exhausted')
|
||||
|| normalized.includes('token_point_balance_exhausted')
|
||||
|| normalized.includes('token balance exhausted')
|
||||
|| normalized.includes('balance exhausted');
|
||||
|| normalized.includes('balance exhausted')
|
||||
|| normalized.includes('词元点数余额不足');
|
||||
}
|
||||
|
||||
export function getAIGatewayErrorKind(message: string | null | undefined): AIGatewayErrorKind | null {
|
||||
|
||||
Reference in new issue
Block a user