Merge pull request #2647 from seefs001/feature/status-code-auto-disable

feat: status code auto-disable configuration
This commit is contained in:
Seefs authored and GitHub committed 2026-01-12 18:47:45 +08:00
1 parent 5812163faa
commit ac04c802a7
13 files changed
+419 -5

No files matched your search

+4 -1
View File
@@ -57,9 +57,12 @@ func ShouldDisableChannel(channelType int, err *types.NewAPIError) bool {
if types.IsSkipRetryError(err) {
return false
}
if err.StatusCode == http.StatusUnauthorized {
if operation_setting.ShouldDisableByStatusCode(err.StatusCode) {
return true
}
//if err.StatusCode == http.StatusUnauthorized {
// return true
//}
if err.StatusCode == http.StatusForbidden {
switch channelType {
case constant.ChannelTypeGemini: