mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-11-20 23:07:18 +00:00
merge: integrate upstream v0.1.105 into release/custom-0.1.105
Merge upstream v0.1.105 (94 commits) with our customizations from release/custom-0.1.104. Key upstream additions: - TLS fingerprint profile management - OpenAI→Anthropic endpoint compatibility routing - Privacy mode for OpenAI/Antigravity accounts - Requested model tracking in usage logs - Error observability enhancements - Various bug fixes Conflict resolutions (all "keep both sides"): - handler.go/wire.go: added both TLSFingerprintProfile and GDriveOAuth - wire_gen.go: combined internal500CounterCache with TLS fingerprint objects - accounts.ts: kept setPrivacy + affinity functions - BulkEditAccountModal.vue: kept OpenAI WS mode + Allow Overages sections Additional fixes: - gateway_handler_chat_completions.go, gateway_handler_responses.go: added missing sub2apiUserID parameter to SelectAccountWithLoadAwareness - antigravity_internal500_penalty.go: gofmt fix
This commit is contained in:
commit
0393981397
176 files changed
+16218
-834
No files matched your search
@@ -135,16 +135,17 @@ func GroupFromServiceAdmin(g *service.Group) *AdminGroup {
|
||||
return nil
|
||||
}
|
||||
out := &AdminGroup{
|
||||
Group: groupFromServiceBase(g),
|
||||
ModelRouting: g.ModelRouting,
|
||||
ModelRoutingEnabled: g.ModelRoutingEnabled,
|
||||
MCPXMLInject: g.MCPXMLInject,
|
||||
DefaultMappedModel: g.DefaultMappedModel,
|
||||
SupportedModelScopes: g.SupportedModelScopes,
|
||||
AccountCount: g.AccountCount,
|
||||
ActiveAccountCount: g.ActiveAccountCount,
|
||||
RateLimitedAccountCount: g.RateLimitedAccountCount,
|
||||
SortOrder: g.SortOrder,
|
||||
Group: groupFromServiceBase(g),
|
||||
ModelRouting: g.ModelRouting,
|
||||
ModelRoutingEnabled: g.ModelRoutingEnabled,
|
||||
MCPXMLInject: g.MCPXMLInject,
|
||||
DefaultMappedModel: g.DefaultMappedModel,
|
||||
SimulateClaudeMaxEnabled: g.SimulateClaudeMaxEnabled,
|
||||
SupportedModelScopes: g.SupportedModelScopes,
|
||||
AccountCount: g.AccountCount,
|
||||
ActiveAccountCount: g.ActiveAccountCount,
|
||||
RateLimitedAccountCount: g.RateLimitedAccountCount,
|
||||
SortOrder: g.SortOrder,
|
||||
}
|
||||
if len(g.AccountGroups) > 0 {
|
||||
out.AccountGroups = make([]AccountGroup, 0, len(g.AccountGroups))
|
||||
@@ -270,6 +271,17 @@ 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 {
|
||||
|
||||
Reference in new issue
Block a user