feat: publish sanitized custom.97 source

This commit is contained in:
cneicy committed 2026-10-27 20:43:39 +08:00
1 parent 8e6ed0317b
commit 86c0276156
1022 files changed
+69903 -19207

No files matched your search

+8 -1
View File
@@ -2,6 +2,7 @@ package service
import (
"fmt"
"net/http"
"sync"
"time"
@@ -163,7 +164,13 @@ func IsPoolFailoverError(c *gin.Context, err *types.NewAPIError) bool {
if c.Writer != nil && c.Writer.Written() {
return false
}
if err.StatusCode < 500 || err.StatusCode > 599 {
if err.StatusCode == http.StatusForbidden {
// Only upstream refusals participate in pool failover. Local permission
// failures must not gain the pool's retry budget or override strict affinity.
if err.GetErrorType() == types.ErrorTypeNewAPIError {
return false
}
} else if err.StatusCode < 500 || err.StatusCode > 599 {
return false
}
return !operation_setting.IsAlwaysSkipRetryStatusCode(err.StatusCode) && !operation_setting.IsAlwaysSkipRetryCode(err.GetErrorCode()) && operation_setting.ShouldRetryByStatusCode(err.StatusCode)