Merge pull request #314 from sczheng189/feat/5xx-error-circuit-breaker

feat: 改进5xx错误熔断机制和重置状态功能
This commit is contained in:
Wesley Liddick
2025-09-02 09:32:08 +08:00
committed by GitHub
3 changed files with 12 additions and 4 deletions

View File

@@ -207,7 +207,7 @@ class ClaudeRelayService {
logger.info(
`🔥 Account ${accountId} has ${errorCount} consecutive 5xx errors in the last 5 minutes`
)
if (errorCount >= 3) {
if (errorCount > 10) {
logger.error(
`❌ Account ${accountId} exceeded 5xx error threshold (${errorCount} errors), marking as temp_error`
)
@@ -939,7 +939,7 @@ class ClaudeRelayService {
logger.info(
`🔥 [Stream] Account ${accountId} has ${errorCount} consecutive 5xx errors in the last 5 minutes`
)
if (errorCount >= 3) {
if (errorCount > 10) {
logger.error(
`❌ [Stream] Account ${accountId} exceeded 5xx error threshold (${errorCount} errors), marking as temp_error`
)