mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-09-03 14:39:26 +08:00
Reuse immutable request bytes during input inspection and avoid a redundant websocket clone while preserving the required outbound envelope. Constraint: Preserve request immutability and one final WebSocket request-body allocation Rejected: In-place JSON mutation | request buffers are shared across translation and execution stages Confidence: high Scope-risk: narrow Directive: Do not retain no-copy gjson results or mutate their backing payload while results are in use Tested: GOTOOLCHAIN=local go test ./...; targeted 8 MiB allocation benchmarks Not-tested: Live Codex upstream network traffic