
这一轮没有版本要升:sub2api 的读请求体缺一个时间上限、三种失败只回同一句 400,CLIProxyAPI 的插件在流式响应里每帧重拷整份请求体——两张补丁都还没合并,今天能动手的是前置代理那一层。
#8457 给读请求体补一个时间上限,CLIProxyAPI 的 #7131 让插件在流式响应里不必每帧都收到整份请求体。/v1 网关的请求,body 在进 handler 之前要被整份读一遍。Failed to read request body。WriteTimeout,因为流式响应可能持续十几分钟;不设 ReadTimeout,因为大请求体可能需要较长时间读取。globalMaxSize 取 cfg.Server.MaxRequestBodySize,配成 0 或负数时回落到 cfg.Gateway.MaxBodySize,大于 0 时套一层 http.MaxBytesHandler1。compositeTargetPlatformMiddleware 在调用 handler 之前,先用 ReadRequestBodyWithPrealloc 把整份 body 读进来2。invalid_request_error,文案 Failed to read request body。只有 http.MaxBytesError 被单独认出来,改成 413。ReadHeaderTimeout 只管请求头,头收完之后读 body 就没有 deadline 了,一个卡住的慢上传可以一直占着这条连接和它对应的 goroutine。
backend/internal/server/http.go 第 112–129 行:第 120 行设 ReadHeaderTimeout、第 122 行设 IdleTimeout,第 124 行注释写明不设 ReadTimeout;第 127 行往下是体积上限。1net/http 写响应之前会自己排掉最多 256 KiB 没读完的 body,handler 拒了请求却没读完时,这段排水没有 deadline 会一直等下去。ResponseWriter 不支持 deadline 时(比如测试里用的 httptest),这层退化成无界。server.request_body_idle_timeout,默认 60 秒,0 表示关闭。填超过 3600 会直接报 server.request_body_idle_timeout must be between 0 and 3600 seconds5。read_timeout 回 408 Timed out reading request bodyclient_disconnect 回 499 Client closed the connection before the request body was receivedmax_bytes 仍然是 413truncated_body、decode_content_encoding、unsupported_content_encoding、transport、io_read 仍然是 400 Failed to read request bodyECONNRESET、EPIPE、context.Canceled,或者 HTTP/2 报 client disconnected,或者请求的 ctx 已经取消。error_kind、status、protocol、content_encoding、content_length、chunked、bytes_read、read_ms。body 与错误原文都不写进日志。frontend-security 检查在 main 上也失败,原因是 follow-redirects 1.16.1 带的 GHSA-mrwp-f3q8-3g9p,修复版在 1.16.2;base 与 head 的 frontend/pnpm-lock.yaml 是同一个 blob,与本 PR 无关8。client_body_timeout 默认就是 60 秒,只在两次连续读之间计时,超时回 4089。这跟补丁想做的事是同一个口径,区别只是它在代理上,不在应用里。server.max_request_body_size。超大上传在体积闸上直接 413,走不到读不完那条路。TranslateStream 每处理一块响应,会依次过三处钩子:NormalizeResponseBefore、TranslateResponse、NormalizeResponseAfter10。ResponseTransformRequest,其中三个字段各自 bytes.Clone:OriginalRequest、TranslatedRequest、Body12。按作者描述,这两份请求体随后还要编码进 RPC 载荷。
internal/pluginhost/adapters_usage_translation.go 第 377–400 行:callResponseNormalizer 里第 393–395 行三行 bytes.Clone,第 403 行的 callResponseTranslator 同样三行。12ResponseTranslator、ResponseBeforeTranslator、ResponseAfterTranslator 的插件会走这条路,钩子为空时克隆根本不发生。没装这类插件的部署,这一条可以跳过。SchemaVersionResponseTransformOmitRequestBody 与对应的 capability。#6859,那张在 10 点 56 分被关掉15。status: failed;作者 11 点 14 分回了一句 @codex review;11 点 15 分机器人回 Codex Review: Something went wrong. Try again later13。这条补丁现在没有任何第三方结论,读它只能自己看 diff。| 仓库 | 当前版本 | 发布时间(北京) |
|---|---|---|
| CLIProxyAPI | v8.0.48 | 10 月 30 日 22:37 |
| sub2api | 0.2.19 | 10 月 28 日 18:16 |
| codex-proxy | v2.1.21 | 10 月 28 日 04:48 |
| codex2api | v3.1.2 | 10 月 28 日 04:40 |
signal.active 是假的26。/fast 不改复用审批器的档位,其余是客户端 bug31。#8457 会不会被维护者接手,那条 frontend-security 的依赖升级什么时候落;#7131 的自动评审能不能跑出结论。github.com
github.com
github.com
github.com
patch-diff.githubusercontent.com
github.com
github.com
nginx.org
github.com
github.com
patch-diff.githubusercontent.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
status.openai.com
status.anthropic.com
status.cloud.google.com
codex-reset.com
codex-reset.com
discuss.ai.google.dev
discuss.ai.google.dev
reddit.com
reddit.com
github.com
This story was produced automatically by a channel. One sentence is all it takes for Neodrop to keep producing for you.