Skip to content

Conversation

@cconger
Copy link
Contributor

@cconger cconger commented Dec 18, 2025

Add a new feature request_compression that when enabled will compress requests to the "OpenAI" provider when using authmode::ChatGPT using zstd compression.

Added a log line to see compression benefits and overhead when enabled with RUST_LOG=codex_api::endpoint::streaming=info

example:

2025-12-19T01:27:40.033256Z  INFO run_task:run_turn{turn_id=2 model=gpt-5.2-codex cwd=/Users/cconger/code/codex/codex-rs}:try_run_turn{turn_id=2 model=gpt-5.2-codex}:stream_request: compressed request body input_bytes=34887 output_bytes=12391 elapsed_ms=0

@cconger cconger force-pushed the cconger/convo-compression branch from 4b7b2e1 to 84dd30c Compare December 20, 2025 00:52
@github-actions
Copy link
Contributor

github-actions bot commented Jan 3, 2026

Closing this pull request because it has had no updates for more than 14 days. If you plan to continue working on it, feel free to reopen or open a new PR.

@github-actions github-actions bot closed this Jan 3, 2026
@apanasenko-oai apanasenko-oai reopened this Jan 5, 2026
Add new model_provider flag for compression to enable request
compression.  We support zstd and gzip, server also supports brotli

You can test this against the sign in with chatgpt flow by adding the
following profile:

```
[profiles.compressed]
name = "compressed"
model_provider = "openai-zstd"

[model_providers.openai-zstd]
name = "OpenAI (ChatGPT, zstd)"
wire_api = "responses"
request_compression = "zstd"
requires_openai_auth = true
```

This will zstd compress your request before sending it to the server.
@cconger cconger force-pushed the cconger/convo-compression branch from 84dd30c to e213999 Compare January 5, 2026 20:41
@rasmusrygaard
Copy link
Contributor

@apanasenko-oai @cconger what do we need to do to get this across the finish line?

@cconger
Copy link
Contributor Author

cconger commented Jan 5, 2026

Working on a more minimal change here that should have the same effect.

To be pushed for consideration soon.

@cconger
Copy link
Contributor Author

cconger commented Jan 6, 2026

Closing in favor of #8767 which is far less invasive.

@cconger cconger closed this Jan 6, 2026
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.

4 participants