mirror of
https://github.com/openai/codex.git
synced 2026-10-28 18:58:46 +00:00
Enable zstd compression for code-mode gRPC responses (#57212)
## What changed - Configure the code-mode host to send zstd-compressed responses when clients advertise support, and enable both client transports to accept them. - Preserve uncompressed responses for clients that do not advertise zstd support. - Patch `tonic` in Bazel builds to use zstd compression level 1, favoring response latency over compression ratio. ## Testing Extend the TCP session integration test to check response encoding and successful session opening for both zstd-capable and uncompressed-only clients. GitOrigin-RevId: b6cf0da51dd30fc2ac9a1b0af11bec26555c559d
This commit is contained in:
@@ -34,6 +34,7 @@ pub(super) async fn run_tcp_listener(bind_address: SocketAddr) -> Result<()> {
|
||||
|
||||
let routes = Routes::new(
|
||||
CodeModeHostServer::new(GrpcCodeModeHost::new())
|
||||
.send_compressed(tonic::codec::CompressionEncoding::Zstd)
|
||||
.max_decoding_message_size(MAX_FRAME_BYTES)
|
||||
.max_encoding_message_size(MAX_FRAME_BYTES),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user