From 15d845cd01ef9d8309422df327c6fd69c78bd360 Mon Sep 17 00:00:00 2001 From: CaIon Date: Sat, 13 Sep 2025 12:53:41 +0800 Subject: [PATCH] fix(adaptor): correct VertexKeyType condition in SetupRequestHeader --- relay/channel/vertex/adaptor.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/relay/channel/vertex/adaptor.go b/relay/channel/vertex/adaptor.go index b6a78b7a..7e2fdcad 100644 --- a/relay/channel/vertex/adaptor.go +++ b/relay/channel/vertex/adaptor.go @@ -160,7 +160,6 @@ func (a *Adaptor) GetRequestURL(info *relaycommon.RelayInfo) (string, error) { if strings.HasPrefix(info.UpstreamModelName, "imagen") { suffix = "predict" } - return a.getRequestUrl(info, info.UpstreamModelName, suffix) } else if a.RequestMode == RequestModeClaude { if info.IsStream { @@ -181,7 +180,7 @@ func (a *Adaptor) GetRequestURL(info *relaycommon.RelayInfo) (string, error) { func (a *Adaptor) SetupRequestHeader(c *gin.Context, req *http.Header, info *relaycommon.RelayInfo) error { channel.SetupApiRequestHeader(info, c, req) - if info.ChannelOtherSettings.VertexKeyType == "json" { + if info.ChannelOtherSettings.VertexKeyType != dto.VertexKeyTypeAPIKey { accessToken, err := getAccessToken(a, info) if err != nil { return err