refactor(channel_select): enhance retry logic and context key usage for channel selection

This commit is contained in:
CaIon
2025-12-13 16:43:38 +08:00
parent b58fa3debc
commit c51936e068
7 changed files with 155 additions and 52 deletions

View File

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