feat: implement per-account inflight request limits and dynamic recommended concurrency calculation.

This commit is contained in:
CJACK
2026-02-16 16:11:12 +08:00
parent c7ffcd76e6
commit 6a6f380987
9 changed files with 323 additions and 58 deletions

9
API.md
View File

@@ -478,10 +478,17 @@ data: {"type":"message_stop"}
"in_use": 1,
"total": 4,
"available_accounts": ["a@example.com"],
"in_use_accounts": ["b@example.com"]
"in_use_accounts": ["b@example.com"],
"max_inflight_per_account": 2,
"recommended_concurrency": 8
}
```
字段说明:
- `max_inflight_per_account`:每个账号允许的并发 in-flight 请求上限(默认 `2`,可由环境变量覆盖)
- `recommended_concurrency`:建议客户端并发值,按 `账号数量 × max_inflight_per_account` 动态计算
### `POST /admin/accounts/test`
请求字段: