配置追踪 · 核对于 2026-10-13

Codex 上下文窗口:258K、272K 与 500K

截至 2026-10-13,OpenAI 官方文档没有公布 Codex 里 GPT-6.1 Sol 的默认上下文窗口。官方公布的是两个能自己设的键:model_context_window(定义原句 Context window tokens available to the active model.)与 model_auto_compact_token_limit(定义原句 Token threshold that triggers automatic history compaction,未设时用模型默认值)。272K 是 API 侧的长上下文计价阈值,500,000 tokens 是 OpenCode 在 v2.0.27 给自己 ChatGPT OAuth 通道抬的输入上限,两者都不是 Codex 的默认值;在检索过的 Codex 官方文档与 changelog 里,258K 没有作为默认值出现。

更新于 2026-10-13

把这个工具接到 QCode 端点:一把 key 调 Claude、GPT 与国产模型。

#model_context_window#auto_compact 阈值#API 272K 计价#OpenCode 500K

四个必须分开的数

未公布

Codex 默认上下文

截至 2026-10-13,官方 Codex 文档只写这两个键可以自己设,没有给出 GPT-6.1 Sol 的默认上下文数字;config-sample 里未设时写的是 default: auto for model。

128000

官方示例值,不是默认值

config-advanced 的示例行是 model_context_window = 128000 # Context window size,config-sample 同一键的注释行还写着 tokens; default: auto for model。

272K

API 长上下文计价阈值

官方模型页原句:Prompts with more than 272K input tokens are priced at 2x input and cache rates and 1.5x output for the full request. 这是计价阈值,不是上下文上限。

500,000

OpenCode 自设的输入上限

OpenCode 官方 changelog v2.0.27(2026-10-12)写明把 ChatGPT OAuth 通道里 gpt-6.1-sol 与 gpt-6.1-sol-fast 的输入上限提到 500,000 tokens。这是 OpenCode 自己产品的上限,不等于 Codex 的默认值。

这三个数各自是谁的

截至 2026-10-13,能逐字核到的只有三类事实。第一类是 Codex 的配置键:官方 Configuration Reference 里 model_context_window 的定义是 Context window tokens available to the active model.,model_auto_compact_token_limit 的定义是 Token threshold that triggers automatic history compaction (unset uses model defaults).,另有 model_auto_compact_token_limit_scope 决定这个阈值数的是整段活动上下文(total,默认)还是压缩窗口前缀之后的增量(body_after_prefix)。第二类是 API 侧的数:官方模型页给 gpt-6.1-sol 写 1,050,000 context window、128,000 max output tokens,并写明输入超过 272K 时整次请求按 2 倍输入与缓存价、1.5 倍输出价计。第三类是别的客户端的上限:OpenCode 在 v2.0.27 把自己 ChatGPT OAuth 通道的输入上限抬到 500,000 tokens。258K 不属于这三类里的任何一条,在检索过的 Codex 官方文档与 changelog 里也找不到它。

官方 changelog 里相关的三条

Codex 官方 changelog 在 2026-09-29 开了 GPT-6.1 Sol in Codex and ChatGPT Work 这一条,正文只写 GPT-6.1 Sol offers near-Astra performance for complex work at a lower cost than Astra 这句定位,以及 Availability depends on your plan, client, and workspace settings. 这句可得性,没有任何默认上下文的数字。2026-10-08 那一条是 GPT-6.1 Sol Ultrafast in Codex and ChatGPT Work。API 侧 changelog 在 2026-09-29 的条目写 Released GPT-6.1 Sol (gpt-6.1-sol),并给出 Standard pricing per 1M tokens for prompts with up to 272K input tokens is $2 input, $0.10 cached input, $2.50 cache write, and $10 output.

相关时间线

2026-09-29

OpenAI 在 API 发布 gpt-6.1-sol,并写明 272K 输入以内的标准价是每百万 token 输入 $2、缓存读 $0.10、缓存写 $2.50、输出 $10;同日 Codex changelog 开了 GPT-6.1 Sol in Codex and ChatGPT Work 条目。两处都没有写 Codex 里的默认上下文是多少。

2026-10-08

Codex changelog:GPT-6.1 Sol Ultrafast in Codex and ChatGPT Work,官方原句是 Ultrafast is available on Pro $500 and eligible Enterprise and Edu plans.。这条讲的是生成速度档位,与上下文窗口无关。

2026-10-12

OpenCode 官方 changelog v2.0.27:Raised the ChatGPT OAuth input limit for gpt-6.1-sol and gpt-6.1-sol-fast to 500,000 tokens. ——这是 OpenCode 自己产品设定的输入上限。

已确认 vs 官方没写的

已确认(官方页逐字可核)

下面每一条都能在 2026-10-13 抓到的官方页面里逐字核到:Codex Configuration Reference 里 model_context_window、model_auto_compact_token_limit、model_auto_compact_token_limit_scope 三个键的定义原句;config-sample 里 model_context_window = 128000 与 model_auto_compact_token_limit = 64000 两行注释,默认值写明是 auto for model 与 unset uses model defaults;config-schema.json 里 Size of the context window for the model, in tokens. 的字段说明;API 模型页的 1,050,000 context window、128,000 max output tokens 与超过 272K 时整次请求 2 倍输入与缓存、1.5 倍输出的计价规则;官方价表 Standard 档 gpt-6.1-sol 一行,短上下文 $2.00 / $0.10 / $2.50 / $10.00、长上下文 $4.00 / $0.20 / $5.00 / $15.00(每百万 token);Codex changelog 里 2026-09-29 与 2026-10-08 两条标题;以及 OpenCode changelog v2.0.27(October 12, 2026)那句 500,000 tokens。

未证实与官方未公布

截至 2026-10-13,OpenAI 官方文档未公布 Codex 里 GPT-6.1 Sol 的默认上下文。检索范围:developers.openai.com 的 Codex Configuration Reference、config-basic、config-advanced、config-sample、config-schema.json、Codex changelog、Codex 的 models 与 model selection,以及 help.openai.com 两篇 Codex 帮助文章(经 web.archive.org 查看),都没有这句话。社区与个人帖里流传的 500K、258K 这类数字不是官方值:500,000 只在 OpenCode 自己的 changelog 里作为 OpenCode 的输入上限出现,258K 在检索过的官方资料里连示例值都不是(官方示例是 128000)。订阅额度方面,官方帮助中心写的是:用量取决于模型、任务运行位置、任务复杂度、上下文、推理、速度和工具,长任务可能比短请求多得多。

客户端上限不一致时怎么分开看

Codex 配置键

官方文档给的是键,不是数:model_context_window 可以自己设,未设时按 Optional manual model metadata. When unset, Codex uses model or preset defaults. 所说,用模型或预设默认。接近上限时由 model_auto_compact_token_limit 触发历史自动压缩,Codex changelog 的原句是 Context compaction automatically summarizes the session as it approaches the context window limit.。这一次会话实际用了多少,只能在客户端里自己测。

OpenCode 这类第三方客户端

客户端自己的输入上限可以和 API 不同:OpenCode 在 v2.0.27 把 ChatGPT OAuth 通道里 gpt-6.1-sol 与 gpt-6.1-sol-fast 的输入上限提到 500,000 tokens。这是 OpenCode 的产品行为,既不是 Codex 的默认值,也不是 API 模型页上那个 1,050,000 context window。要对比上限,只能看各家自己 changelog 与文档里的原句。

能自己设的三个键怎么写

写法一律照抄官方文档。① 上下文窗口:Configuration Reference 的条目是 model_context_window number Context window tokens available to the active model.,config-advanced 的示例行是 model_context_window = 128000 # Context window size,config-sample 同名注释行后面还带 tokens; default: auto for model。② 自动压缩阈值:model_auto_compact_token_limit number Token threshold that triggers automatic history compaction (unset uses model defaults).,config-sample 的注释示例是 model_auto_compact_token_limit = 64000 # tokens; unset uses model defaults。③ 计数口径:model_auto_compact_token_limit_scope 取 total 或 body_after_prefix,官方说明是阈值覆盖整段活动上下文(total,默认)还是只覆盖压缩窗口前缀之后的增长;config-sample 的注释示例是 model_auto_compact_token_limit_scope = "total"。这三行在 config-sample 里和 model_provider 一起放在顶层示例区。文档没有为 GPT-6.1 Sol 写出默认数字。

在 QCode 上

QCode 上 gpt-6.1-sol 可以调,这个 ID 在页面上逐字写作 gpt-6.1-sol。接 Codex 照 docs.qcode.cc 的写法:config.toml 里 base_url = "https://api.qcode.cc/openai" 配 wire_api = "responses",docs 对 wire_api 的说明是 API 协议类型、Codex 使用 responses。密钥是控制台里以 cr_ 开头的 QCode 密钥,按 docs 的写法放进 ~/.codex/auth.json 的 OPENAI_API_KEY,或者放进 env_key 指定的那个环境变量(docs 写明 env_key 是环境变量名,Codex 从该变量读取密钥)。只支持 OpenAI Chat 协议的工具填 https://api.qcode.cc/openai/v1。上下文窗口与自动压缩阈值就用上面那两个 Codex 键自己设。按 token 计费,各模型单价见 /models。GPT 系列单次请求输入(含缓存命中部分)超过 272K tokens 时,整次请求的输入与缓存读按 2 倍、输出按 1.5 倍计费,/models 里 gpt-6.1-sol 那一行把 272K 前后两档分开列。

常见问题

Codex 里 GPT-6.1 Sol 的默认上下文是多少?

官方没公布。截至 2026-10-13,Codex 官方文档与 changelog 定义了 model_context_window 和 model_auto_compact_token_limit 这两个键,但没有给出 GPT-6.1 Sol 在 Codex 里的默认上下文数字;config-sample 里能核到的只有未设时 default: auto for model 这句。要一个固定值,就自己写 model_context_window。

258K 是哪个官方默认值?

都不是。258K 在检索过的 Codex 官方文档与 changelog 里没有作为默认值出现。官方公布的、与上下文直接相关的数字有:model_context_window 的示例值 128000、model_auto_compact_token_limit 的示例值 64000、API 模型页的 1,050,000 context window 与 128,000 max output tokens,以及 272K 这个计价阈值;258K 不在其中,也没有来源。把 258K 当官方默认值写进配置或成本模型,没有来源可依。

272K 是上下文上限还是计价阈值?

是计价阈值。官方模型页的原句是 Prompts with more than 272K input tokens are priced at 2x input and cache rates and 1.5x output for the full request.,它不给上下文封顶:同一页给 gpt-6.1-sol 写的是 1,050,000 context window 与 128,000 max output tokens。

500K 这个数是从哪来的?

来自 OpenCode 自己的 changelog。日期为 October 12, 2026 的 v2.0.27 写着 Raised the ChatGPT OAuth input limit for gpt-6.1-sol and gpt-6.1-sol-fast to 500,000 tokens.。这是 OpenCode 给它那条 ChatGPT OAuth 通道设的输入上限,不是 Codex 的默认值,也不是 OpenAI 公布的数字。

想自己设上下文和自动压缩阈值,写哪几个键?

在 config.toml 里用官方那三个键:model_context_window(Context window tokens available to the active model.)、model_auto_compact_token_limit(Token threshold that triggers automatic history compaction,未设时用模型默认)、model_auto_compact_token_limit_scope(默认 total,取 body_after_prefix 时只数压缩窗口前缀之后的增长)。官方示例值分别是 128000 与 64000。

在国内、没有境外信用卡,怎么付款开通?

用支付宝或微信支付,全程自助。站内充值页列出的付款方式是支付宝、微信支付、信用卡(Visa / Mastercard / AMEX)、Apple Pay、Google Pay 和加密货币(多币种多网络),页面并写明无需境外信用卡;充值后自助开通、立刻生效,不需要人工处理。按 token 计费,各模型单价见 /models。

信息来源

OpenAI 侧(均于 2026-10-13 查阅):developers.openai.com 的 Codex Configuration Reference、config-basic、config-advanced、config-sample 与 config-schema.json,Codex changelog、Codex 的 models 与 model selection 页,API 的 gpt-6.1-sol 模型页、pricing 价表、changelog 与 Compaction 指南;另有 help.openai.com 两篇 Codex 帮助文章(经 web.archive.org 查看)。OpenCode 侧:opencode.ai 官方 changelog,2026-10-13 抓取。QCode 侧:docs.qcode.cc 的 Codex 接入页、端点与 API 路径页、付款方式总览页,以及 qcode.cc 线上页 /models、/recharge、/pricing,均为 2026-10-13 抓取。

上下文和压缩阈值,由你自己写进配置

Codex 填 https://api.qcode.cc/openai 并配 wire_api = "responses" 就能调 gpt-6.1-sol,按 token 计费,各模型单价见 /models。

先体验,再决定

不确定选哪档?先买体验版(¥60/月),满意再升级,旧套餐剩余价值按比例退回余额。