feat: switch priority when retry (close #1048)

This commit is contained in:
JustSong
2024-03-03 22:14:07 +08:00
parent 9d8967f7d3
commit 2df877a352
4 changed files with 16 additions and 3 deletions

View File

@@ -68,7 +68,7 @@ func Distribute() func(c *gin.Context) {
}
}
requestModel = modelRequest.Model
channel, err = model.CacheGetRandomSatisfiedChannel(userGroup, modelRequest.Model)
channel, err = model.CacheGetRandomSatisfiedChannel(userGroup, modelRequest.Model, false)
if err != nil {
message := fmt.Sprintf("当前分组 %s 下对于模型 %s 无可用渠道", userGroup, modelRequest.Model)
if channel != nil {