fix: 优化codex 429限流显示为恩替

This commit is contained in:
shaw
2025-09-08 16:13:24 +08:00
parent d77605a8ad
commit 399e6b9d8c
2 changed files with 17 additions and 19 deletions

View File

@@ -1735,6 +1735,23 @@ const getSchedulableReason = (account) => {
}
}
// OpenAI 账户的错误状态
if (account.platform === 'openai') {
if (account.status === 'unauthorized') {
return '认证失败401错误'
}
// 检查限流状态 - 兼容嵌套的 rateLimitStatus 对象
if (
(account.rateLimitStatus && account.rateLimitStatus.isRateLimited) ||
account.isRateLimited
) {
return '触发限流429错误'
}
if (account.status === 'error' && account.errorMessage) {
return account.errorMessage
}
}
// 通用原因
if (account.stoppedReason) {
return account.stoppedReason