mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-04-19 07:37:27 +00:00
refactor(channel_select): enhance retry logic and context key usage for channel selection
This commit is contained in:
@@ -308,7 +308,7 @@ func SetupContextForToken(c *gin.Context, token *model.Token, parts ...string) e
|
||||
c.Set("token_model_limit_enabled", false)
|
||||
}
|
||||
common.SetContextKey(c, constant.ContextKeyTokenGroup, token.Group)
|
||||
c.Set("token_cross_group_retry", token.CrossGroupRetry)
|
||||
common.SetContextKey(c, constant.ContextKeyTokenCrossGroupRetry, token.CrossGroupRetry)
|
||||
if len(parts) > 1 {
|
||||
if model.IsAdmin(token.UserId) {
|
||||
c.Set("specific_channel_id", parts[1])
|
||||
|
||||
Reference in New Issue
Block a user