fix: failover grsai maintenance image models
This commit is contained in:
parent
c631f906b1
commit
2f6d0498e2
@ -70,7 +70,16 @@ export function shouldCooldownImageFallbackModel(errorMessage: string): boolean
|
||||
msg.includes("api key is missing") ||
|
||||
msg.includes("invalid api key") ||
|
||||
msg.includes("unauthorized") ||
|
||||
msg.includes("cannot convert argument to a bytestring")
|
||||
msg.includes("cannot convert argument to a bytestring") ||
|
||||
msg.includes("model maintenance") ||
|
||||
msg.includes("maintenance") ||
|
||||
msg.includes("维护中") ||
|
||||
msg.includes("维护") ||
|
||||
msg.includes("service unavailable") ||
|
||||
msg.includes("temporarily unavailable") ||
|
||||
msg.includes("系统繁忙") ||
|
||||
msg.includes("无可用渠道") ||
|
||||
/(?:^|\D)(?:429|500|502|503|504)(?:\D|$)/.test(msg)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -162,6 +162,8 @@ export function classifyAiModelHealthFailure(error: unknown): {
|
||||
normalized.includes("504") ||
|
||||
normalized.includes("model maintenance") ||
|
||||
normalized.includes("maintenance") ||
|
||||
normalized.includes("维护中") ||
|
||||
normalized.includes("维护") ||
|
||||
normalized.includes("修复中") ||
|
||||
normalized.includes("系统繁忙") ||
|
||||
normalized.includes("no available channel") ||
|
||||
@ -219,6 +221,8 @@ export function shouldFailoverAiModelError(error: unknown) {
|
||||
normalized.includes("temporarily unavailable") ||
|
||||
normalized.includes("model maintenance") ||
|
||||
normalized.includes("maintenance") ||
|
||||
normalized.includes("维护中") ||
|
||||
normalized.includes("维护") ||
|
||||
normalized.includes("修复中") ||
|
||||
normalized.includes("系统繁忙") ||
|
||||
normalized.includes("无可用渠道")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user