mirror of
https://github.com/zyycn/codex-proxy-rs.git
synced 2026-11-06 08:06:19 +00:00
fix(plugins): separate execution capacity from downstream waits (#434)
* fix(plugins): delegate HTTP requests on RPC admission exhaustion Co-authored-by: Codex <noreply@openai.com> * fix(plugins): align default RPC capacity at 64 Raise host and SDK call and callback limits together, exercise 64 in-flight HTTP calls, and document plugin rebuild requirements. Co-authored-by: Codex <noreply@openai.com> * fix(plugins): preserve middleware execution under RPC saturation Remove capacity-triggered delegation, retain the 64-call defaults, and verify that saturation never bypasses a healthy HTTP plugin. Co-authored-by: Codex <noreply@openai.com> * fix(plugins): separate execution capacity from downstream waits Bound initial admission and total in-flight resources while preserving middleware continuations. Keep queue waits independent of processing deadlines and report overload without bypassing plugins. Co-authored-by: Codex <noreply@openai.com> --------- Co-authored-by: Zyy <zyycn@users.noreply.github.com> Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -124,6 +124,14 @@ flowchart LR
|
||||
上游 429、用户请求错误和插件主动拒绝请求等业务结果不会直接停止插件。其他插件、原生转发和管理端继续运行,
|
||||
不因单个插件故障撤销整个宿主的运行配置。命中故障插件绑定的请求仍遵循既有拒绝或委托策略,入口认证插件失败不会绕过认证
|
||||
|
||||
宿主每个插件会话默认允许 64 个执行中的 RPC 调用、64 个初次排队调用和 256 个总在途上下文。
|
||||
等待 `next` 时释放执行名额,返回后重新取得名额并继续原调用;已返回响应头的流继续占用在途预算,不占首结果执行名额。
|
||||
初次排队和恢复等待各限 30 秒,不扣插件自身默认上限 120 秒的处理预算。达到容量或等待上限时,中间件明确返回过载错误,HTTP 响应为 503(`middleware_capacity_unavailable`),不跳过插件、不重放请求。
|
||||
这些数值是有界资源预算的初值,实际容量需结合插件耗时、正文和流的资源占用评估
|
||||
|
||||
普通宿主回调默认上限 64,`next` 使用总在途上限对应的独立回调预算。实际容量同时受插件 SDK 配置约束;
|
||||
使用较小上限或未区分 `next` 回调预算的插件需由作者调整并重新构建,升级宿主不会改变已安装插件的容量
|
||||
|
||||
### 停用与删除
|
||||
|
||||
| 操作 | 删除什么 | 保留什么 |
|
||||
|
||||
Reference in New Issue
Block a user