Merge pull request #7064 from xlplbo/codex/openai-ws-v2-pool-capacity

fix(openai-ws): 对齐新版 ctx_pool 连接容量计算
This commit is contained in:
Wesley Liddick authored and GitHub committed 2026-09-12 20:13:03 +08:00
commit bdb42e22f8
12 files changed
+148 -66

No files matched your search

+2 -8
View File
@@ -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