From 145bb14cb27beadff23475e673aba6803b5c1763 Mon Sep 17 00:00:00 2001 From: JustSong Date: Fri, 9 Jun 2023 18:57:27 +0800 Subject: [PATCH] fix: fix not using proxy when update balance --- controller/channel-billing.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/controller/channel-billing.go b/controller/channel-billing.go index 5ab0ac7b..de3fc5f9 100644 --- a/controller/channel-billing.go +++ b/controller/channel-billing.go @@ -41,7 +41,9 @@ func updateChannelBalance(channel *model.Channel) (float64, error) { baseURL := common.ChannelBaseURLs[channel.Type] switch channel.Type { case common.ChannelTypeOpenAI: - // do nothing + if channel.BaseURL != "" { + baseURL = channel.BaseURL + } case common.ChannelTypeAzure: return 0, errors.New("尚未实现") case common.ChannelTypeCustom: