revert: remove affinity scheduling, Claude Max cache simulation, Sora async tasks, and GDrive remnants

Remove 4 features from the release branch to keep it focused on channel management + upstream:

1. Affinity scheduling: gateway affinity flow, Redis Lua scripts, account methods,
   handler endpoints, frontend components (AffinityBadge, AffinityConfigCard)

2. Claude Max cache simulation: billing policy, tokenizer, response helpers,
   Group.SimulateClaudeMaxEnabled field, ent schema changes, frontend toggles

3. Sora async tasks: task service/worker/repo, videos handler, object storage
   abstraction, frontend components (SoraGeneratePage, SoraProgressCard, etc.),
   S3 storage admin settings

4. Google Drive remnants: gdrive constant cleanup (base revert was already done)

All tests pass. Channel management code preserved intact.
This commit is contained in:
erio committed 2026-04-04 16:34:17 +08:00
1 parent d1499ee56f
commit c790b808dd
94 files changed
+79 -11529

No files matched your search

-12
View File
@@ -140,7 +140,6 @@ func GroupFromServiceAdmin(g *service.Group) *AdminGroup {
ModelRoutingEnabled: g.ModelRoutingEnabled,
MCPXMLInject: g.MCPXMLInject,
DefaultMappedModel: g.DefaultMappedModel,
SimulateClaudeMaxEnabled: g.SimulateClaudeMaxEnabled,
SupportedModelScopes: g.SupportedModelScopes,
AccountCount: g.AccountCount,
ActiveAccountCount: g.ActiveAccountCount,
@@ -279,17 +278,6 @@ func AccountFromServiceShallow(a *service.Account) *Account {
}
}
// 客户端亲和调度(Anthropic 和 Antigravity 账号)
if a.IsAffinityEnabled() {
enabled := true
out.ClientAffinityEnabled = &enabled
allow := a.IsAffinityAllowSwitch()
out.AffinityAllowSwitch = &allow
if pinnedUsers := a.GetPinnedUsers(); len(pinnedUsers) > 0 {
out.PinnedUserIDs = pinnedUsers
}
}
// 提取账号配额限制(apikey / bedrock 类型有效)
if a.IsAPIKeyOrBedrock() {
if limit := a.GetQuotaLimit(); limit > 0 {