Merge commit '3d149fedf45472eff92910324974c762fc37dad6'

This commit is contained in:
Laisky.Cai
2024-04-21 15:05:13 +00:00
45 changed files with 649 additions and 223 deletions

View File

@@ -13,7 +13,7 @@ import (
"time"
"github.com/Laisky/one-api/common"
"github.com/Laisky/one-api/common/config"
"github.com/Laisky/one-api/common/ctxkey"
"github.com/Laisky/one-api/common/helper"
"github.com/Laisky/one-api/common/logger"
"github.com/Laisky/one-api/common/random"
@@ -281,7 +281,7 @@ func getAPIVersion(c *gin.Context, modelName string) string {
return apiVersion
}
apiVersion = c.GetString(config.KeyAPIVersion)
apiVersion = c.GetString(ctxkey.ConfigAPIVersion)
if apiVersion != "" {
return apiVersion
}