diff --git a/controller/channel-test.go b/controller/channel-test.go index f709a6df..6d18305a 100644 --- a/controller/channel-test.go +++ b/controller/channel-test.go @@ -178,7 +178,11 @@ func testChannels(notify bool, scope string) error { milliseconds := tok.Sub(tik).Milliseconds() if isChannelEnabled && milliseconds > disableThreshold { err = errors.New(fmt.Sprintf("响应时间 %.2fs 超过阈值 %.2fs", float64(milliseconds)/1000.0, float64(disableThreshold)/1000.0)) - monitor.DisableChannel(channel.Id, channel.Name, err.Error()) + if config.AutomaticDisableChannelEnabled { + monitor.DisableChannel(channel.Id, channel.Name, err.Error()) + } else { + _ = message.Notify(message.ByAll, fmt.Sprintf("渠道 %s (%d)测试超时", channel.Name, channel.Id), "", err.Error()) + } } if isChannelEnabled && util.ShouldDisableChannel(openaiErr, -1) { monitor.DisableChannel(channel.Id, channel.Name, err.Error())