mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-07 17:08:33 +08:00
fix(grok): 防止加权粘连回退绕过免费额度门禁
This commit is contained in:
@@ -1248,6 +1248,12 @@ func (s *defaultOpenAIAccountScheduler) tryFallbackToWeightedSticky(
|
||||
if req.RequireCompact && openAICompactSupportTier(account) == 0 {
|
||||
continue
|
||||
}
|
||||
// Keep weighted sticky fallback subject to the same free-tier gate as the
|
||||
// normal and sticky selection paths. Otherwise an over-quota free account
|
||||
// could be reintroduced after the primary candidate pass.
|
||||
if len(s.filterGrokFreeQuotaAccounts(ctx, []Account{*account})) == 0 {
|
||||
continue
|
||||
}
|
||||
result, acquireErr := s.service.tryAcquireAccountSlot(ctx, account.ID, account.Concurrency)
|
||||
if acquireErr != nil {
|
||||
return nil, acquireErr
|
||||
|
||||
Reference in New Issue
Block a user