feat: set API version for Azure and Vertex AI channel types

This commit is contained in:
CaIon
2025-08-16 14:56:19 +08:00
parent 73a7b33864
commit 5654d08086

View File

@@ -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