From 5654d080862aba7be0ef408f9d57190814eab51e Mon Sep 17 00:00:00 2001 From: CaIon Date: Sat, 16 Aug 2025 14:56:19 +0800 Subject: [PATCH] feat: set API version for Azure and Vertex AI channel types --- relay/common/relay_info.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/relay/common/relay_info.go b/relay/common/relay_info.go index 30a17f6f..42f759ad 100644 --- a/relay/common/relay_info.go +++ b/relay/common/relay_info.go @@ -138,6 +138,13 @@ func (info *RelayInfo) InitChannelMeta(c *gin.Context) { SupportStreamOptions: false, } + if channelType == constant.ChannelTypeAzure { + channelMeta.ApiVersion = GetAPIVersion(c) + } + if channelType == constant.ChannelTypeVertexAi { + channelMeta.ApiVersion = c.GetString("region") + } + channelSetting, ok := common.GetContextKeyType[dto.ChannelSettings](c, constant.ContextKeyChannelSetting) if ok { channelMeta.ChannelSetting = channelSetting