Skip to content

fix: 入站请求体上限 32 MiB → 64 MiB(#436) - #446

Closed
dofastted wants to merge 1 commit into
mainfrom
cursor/inbound-body-64mib-75e0
Closed

dofastted wants to merge 1 commit into
mainfrom
cursor/inbound-body-64mib-75e0

Conversation

@dofastted

Copy link
Copy Markdown
Owner

背景

Fixes #436 / REQ-0436。用户入站请求体约 40MB 时在 Codex kernel(Axum)层收到 413:Failed to buffer the request body: length limit exceeded。此前 #169 已将预编译 kernel 默认与 max_request_bytes 从 2 MiB 提到 32 MiB;本次在同样旋钮上继续提到 64 MiB。

Node 控制面 KIN_MAX_BODY 默认 128MB 不变;本次只调整槽位 / Codex kernel 写入配置的 max_request_bytes 及相关 Go worker 缺省值。

变更

  • writeCodexKernelConfig:max_request_bytes 64 MiB
  • writeKernelConfig(Claude rust kernel):64 MiB
  • vm-runtime worker 配置:64 MiB
  • worker/internal/config:未配置时的 MaxRequestBytes 缺省 64 << 20
  • 单测:codex-kernel-client、kernel-router、config_test
  • CHANGELOG.md → Unreleased(未改 VERSION)

未改动

鉴权、计费、并发、公开 API 形状;无数据库迁移。

部署说明

升级 Node 控制面并重启后,新写入的 codex-kernel.json / kernel.json 会带 64 MiB 上限;已在跑的 kin-codex-kernel 子进程需重启(重启 Node 或逐槽重启 kernel)才会读到新配置。预编译 kin-codex-kernel payload 若仍带 32 MiB 编译默认值,只要配置里显式写了 max_request_bytes(控制面一直会写)即生效;与 #169 策略一致。

测试

  • biome format --write(已跑)
  • node --test test/unit/codex-kernel-client.test.mjs
  • node --test test/unit/kernel-router.test.mjs
  • npm run test:go
Open in Web Open in Cursor 

Align Codex and Claude slot kernel configs with REQ-0436: max_request_bytes
defaults and supervisor-written values go from 32 MiB to 64 MiB. Go worker
config fallback matches. Tests and CHANGELOG Unreleased entry included.

Co-authored-by: ted <kuhlmangarry24@gmail.com>

Copy link
Copy Markdown
Owner Author

已被 #448(v1.3.171 tip-cut)吸收意图但方案不同:#448 为可配置 8–128 MiB、默认仍 32;硬改 64 会冲突。请勿再合;本 PR 可关。

@dofastted

Copy link
Copy Markdown
Owner Author

已由 #448 / v1.3.171 取代,本 PR 不再合并。

@dofastted dofastted closed this Oct 15, 2026
@dofastted
dofastted deleted the cursor/inbound-body-64mib-75e0 branch October 16, 2026 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] 413,请求体过大,Failed to buffer the request body: length limit exceeded

2 participants