mirror of
https://github.com/zyycn/codex-proxy-rs.git
synced 2026-11-06 08:06:19 +00:00
feat(openai): configure Guardian concurrency priority at runtime (#306)
Configure Guardian reservations through persisted runtime settings and frozen request policies. Combine concurrency controls and queues in the admin UI, with the scheduling strategy shown first. Prioritize Guardian account waiters, recheck displaced queue heads before lease acquisition, and report request-specific available capacity. Preserve account, key and wait-budget limits. Co-authored-by: Yongzhao Chen <yongzhao.derek@gmail.com> Co-authored-by: Zyy <zyycn@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
co-authored by
Yongzhao Chen
Zyy
Claude Opus 5.5
Codex
parent
a0e8f768dd
commit
90e241f74b
@@ -1218,6 +1218,7 @@ refreshConcurrency
|
||||
maxConcurrentPerAccount
|
||||
maxWaitingPerKey
|
||||
maxWaitingPerAccount
|
||||
openaiGuardianReservedConcurrency
|
||||
concurrencyWaitTimeoutSeconds
|
||||
responsesMaxDecompressedBodyBytes
|
||||
requestIntervalMs
|
||||
@@ -1265,6 +1266,13 @@ accountWarmupModel
|
||||
切换账号或内部重试不重新计时,等待同时计入请求总超时。该时限不用于中断已开始的上游生成。
|
||||
设置更新请求须包含这三个字段,新请求使用更新后的快照
|
||||
|
||||
`openaiGuardianReservedConcurrency`(默认 0,取值 0~4,294,967,295)为 Codex Guardian 自动审批保留账号并发,保存后对新请求生效。
|
||||
Guardian 以 `subagent_kind` 或 `client_metadata.x-openai-subagent` 值 `guardian` 识别。取值 R 大于 0 时,
|
||||
有限上限为 L 的账号对其他 OpenAI 请求只开放 `max(L − R, 1)` 个名额,Guardian 可用满 L;
|
||||
开启账号排队后,Guardian 排在同账号已有 Guardian 之后、全部普通等待者之前,不受单账号排队上限约束,
|
||||
仍受总等待容量与等待时限约束。不限并发的账号和关闭排队时的其余行为不变。
|
||||
设置更新请求须包含该字段
|
||||
|
||||
`responsesMaxDecompressedBodyBytes` 是压缩 Responses HTTP 请求的解压输出上限,单位字节,默认
|
||||
67108864(64 MiB)。必须为正整数,且可表示为进程平台的 `isize`;管理端以整数 MiB 编辑。
|
||||
保存并发布成功后,新请求使用新值;已鉴权请求沿用原快照,无需重启。调高上限会增加大请求的内存占用,
|
||||
|
||||
Reference in New Issue
Block a user