mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-10-14 14:30:26 +00:00
feat: switch priority when retry (close #1048)
This commit is contained in:
@@ -62,7 +62,7 @@ func Relay(c *gin.Context) {
|
||||
retryTimes = 0
|
||||
}
|
||||
for i := retryTimes; i > 0; i-- {
|
||||
channel, err := dbmodel.CacheGetRandomSatisfiedChannel(group, originalModel)
|
||||
channel, err := dbmodel.CacheGetRandomSatisfiedChannel(group, originalModel, true)
|
||||
if err != nil {
|
||||
logger.Errorf(ctx, "CacheGetRandomSatisfiedChannel failed: %w", err)
|
||||
break
|
||||
|
Reference in New Issue
Block a user