Browse Source

feat(channel): add handling for pre_consume_token_quota_failed error type

CaIon 8 months ago
parent
commit
4d8e63bd1a
1 changed files with 2 additions and 0 deletions
  1. 2 0
      service/channel.go

+ 2 - 0
service/channel.go

@@ -59,6 +59,8 @@ func ShouldDisableChannel(channelType int, err *dto.OpenAIErrorWithStatusCode) b
 		return true
 		return true
 	case "billing_not_active":
 	case "billing_not_active":
 		return true
 		return true
+	case "pre_consume_token_quota_failed":
+		return true
 	}
 	}
 	switch err.Error.Type {
 	switch err.Error.Type {
 	case "insufficient_quota":
 	case "insufficient_quota":