From 8c8661d0d77c859e2853b886fd6c5d7649eeb401 Mon Sep 17 00:00:00 2001 From: CaIon Date: Mon, 13 Apr 2026 16:39:12 +0800 Subject: [PATCH] refactor: clean up unused imports and commented-out code in channel.go --- service/channel.go | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/service/channel.go b/service/channel.go index 96bc1efe..f93b29a2 100644 --- a/service/channel.go +++ b/service/channel.go @@ -2,11 +2,9 @@ package service import ( "fmt" - "net/http" "strings" "github.com/QuantumNous/new-api/common" - "github.com/QuantumNous/new-api/constant" "github.com/QuantumNous/new-api/dto" "github.com/QuantumNous/new-api/model" "github.com/QuantumNous/new-api/setting/operation_setting" @@ -63,12 +61,12 @@ func ShouldDisableChannel(channelType int, err *types.NewAPIError) bool { //if err.StatusCode == http.StatusUnauthorized { // return true //} - if err.StatusCode == http.StatusForbidden { - switch channelType { - case constant.ChannelTypeGemini: - return true - } - } + //if err.StatusCode == http.StatusForbidden { + // switch channelType { + // case constant.ChannelTypeGemini: + // return true + // } + //} oaiErr := err.ToOpenAIError() switch oaiErr.Code { case "invalid_api_key":