mirror of
https://github.com/zyycn/codex-proxy-rs.git
synced 2026-11-18 16:06:47 +00:00
Official Codex Desktop app-server and Grok CLI build reqwest without compression features, so upstream requests carry no Accept-Encoding. Drop the gzip/brotli/zstd/deflate features and the explicit 'accept-encoding: identity' Grok header so the wire matches official clients. Verified: reqwest only inserts Accept-Encoding through the tower-http Decompression layer, which is compiled solely when a compression feature is enabled; the official binary's 'gzip, deflate' string is the h2 HPACK static table entry, not a request header. Also stop downstream clients from injecting device attestation/integrity headers (x-oai-attestation, x-oai-is, x-oai-is-update) at both the API passthrough boundary and the provider header builder; only the official client or the gateway itself may supply those. Co-authored-by: Codex <noreply@openai.com>