﻿---
title: "请求压缩默认开；代理把 body 搞坏再关"
summary: "features.enable_request_compression 稳定且默认 true，用 zstd 压流式请求体。中间盒拒绝压缩编码时设 false。"
category: config
level: intermediate
surfaces: [cli, app, ide]
tags: ["config.toml", "features", "网络"]
canonical: /tips/request-compression-zstd/
---

# 请求压缩默认开；代理把 body 搞坏再关

features.enable_request_compression 稳定且默认 true，用 zstd 压流式请求体。中间盒拒绝压缩编码时设 false。

官方配置参考把这项标成 stable，默认已开：

```toml
[features]
enable_request_compression = true
```

只在服务端支持时压缩流式请求体。ChatGPT 登录、走 OpenAI Responses 时才会压；别的 provider 或 API key 路径可能静默不压，`true` 不等于「每次上传都是 zstd」。

企业代理、TLS 中间盒如果改写或拒绝 `Content-Encoding`，会话会表现为连不上或流式中断。先关压缩验证：

```toml
[features]
enable_request_compression = false
```

一次性覆盖：

```bash
codex -c features.enable_request_compression=false
```

不要为了「省流量」去开实验性的 `features.rollout_budget`：那是另一套未完成的 token 预算，默认关，开了还要设 `limit_tokens`。压缩开关只管请求体体积。

## 来源

- [OpenAI · Configuration reference](https://learn.chatgpt.com/docs/config-file/config-reference)
- [openai/codex#18677](https://github.com/openai/codex/issues/18677)
