mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-11-18 15:00:30 +00:00
Merge pull request #7064 from xlplbo/codex/openai-ws-v2-pool-capacity
fix(openai-ws): 对齐新版 ctx_pool 连接容量计算
This commit is contained in:
12 files changed
+148
-66
No files matched your search
@@ -2221,14 +2221,8 @@ func (p *openAIWSConnPool) effectiveMaxConnsByAccount(account *Account) int {
|
||||
if hardCap <= 0 {
|
||||
return 0
|
||||
}
|
||||
if p.modeRouterV2Enabled() {
|
||||
if account == nil {
|
||||
return hardCap
|
||||
}
|
||||
if account.Concurrency <= 0 {
|
||||
return 0
|
||||
}
|
||||
return min(account.Concurrency, hardCap)
|
||||
if p.modeRouterV2Enabled() && account != nil && account.Concurrency <= 0 {
|
||||
return 0
|
||||
}
|
||||
if account == nil || !p.dynamicMaxConnsEnabled() {
|
||||
return hardCap
|
||||
|
||||
Reference in new issue
Block a user