Spec tracker · checked 2026-10-13

Codex Context Window: 258K, 272K and 500K

As of 2026-10-13 the OpenAI documentation does not publish a default context window for GPT-6.1 Sol in Codex. What it does publish are two keys you can set yourself: model_context_window (defined as Context window tokens available to the active model.) and model_auto_compact_token_limit (Token threshold that triggers automatic history compaction, model defaults when unset). 272K is the long-context pricing threshold on the API side, and 500,000 tokens is the input limit OpenCode raised for its own ChatGPT OAuth path in v2.0.27. Neither is a Codex default, and 258K does not appear as a default in the Codex documentation and changelog searched.

Updated 2026-10-13

Point this tool at the QCode endpoint — one key for Claude, GPT and Chinese models.

#model_context_window#auto_compact threshold#API 272K pricing#OpenCode 500K

Four numbers that must stay separate

not published

Codex default context

As of 2026-10-13 the official Codex docs only say these keys can be set; they give no default context figure for GPT-6.1 Sol. In config-sample the value applied when the key is unset is stated as default: auto for model.

128000

the documented example, not a default

config-advanced shows model_context_window = 128000 # Context window size, and the comment for the same key in config-sample adds tokens; default: auto for model.

272K

API long-context pricing threshold

Verbatim from the official model page: Prompts with more than 272K input tokens are priced at 2x input and cache rates and 1.5x output for the full request. That is a pricing threshold, not a context ceiling.

500,000

an input limit OpenCode set for itself

The OpenCode changelog v2.0.27 (2026-10-12) raised the ChatGPT OAuth input limit for gpt-6.1-sol and gpt-6.1-sol-fast to 500,000 tokens. That is OpenCode's own product limit, not a Codex default.

Whose number is which

As of 2026-10-13 only three kinds of claims can be checked word for word. First, the Codex config keys: in the official Configuration Reference model_context_window is defined as Context window tokens available to the active model., model_auto_compact_token_limit as Token threshold that triggers automatic history compaction (unset uses model defaults)., and model_auto_compact_token_limit_scope decides whether the threshold counts the full active context (total, the default) or only growth after the carried compaction-window prefix (body_after_prefix). Second, the API-side numbers: the official model page gives gpt-6.1-sol a 1,050,000 context window and 128,000 max output tokens, and says a prompt above 272K input tokens is billed at 2x input and cache rates and 1.5x output for the whole request. Third, another client's ceiling: OpenCode raised the input limit of its own ChatGPT OAuth path to 500,000 tokens in v2.0.27. 258K belongs to none of these, and it does not appear in the Codex documentation and changelog searched.

The three relevant official changelog entries

The Codex changelog opened an entry titled GPT-6.1 Sol in Codex and ChatGPT Work on 2026-09-29. Its body only positions the model (GPT-6.1 Sol offers near-Astra performance for complex work at a lower cost than Astra) and states availability with Availability depends on your plan, client, and workspace settings. No default context number appears. The 2026-10-08 entry is GPT-6.1 Sol Ultrafast in Codex and ChatGPT Work. The API changelog entry dated 2026-09-29 reads Released GPT-6.1 Sol (gpt-6.1-sol) and gives 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.

Timeline

2026-09-29

OpenAI releases gpt-6.1-sol in the API and states the standard price for prompts up to 272K input tokens: $2 input, $0.10 cached input, $2.50 cache write, $10 output per 1M tokens. The Codex changelog opens its GPT-6.1 Sol in Codex and ChatGPT Work entry the same day. Neither says what Codex's default context window is.

2026-10-08

Codex changelog: GPT-6.1 Sol Ultrafast in Codex and ChatGPT Work, with the official line Ultrafast is available on Pro $500 and eligible Enterprise and Edu plans. This is a token-generation tier and says nothing about the context window.

2026-10-12

The 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. That is a limit OpenCode set inside its own product.

Confirmed vs not published

Confirmed (verbatim in the official pages)

Every item below can be checked word for word in the official pages captured on 2026-10-13: the definitions of model_context_window, model_auto_compact_token_limit and model_auto_compact_token_limit_scope in the Codex Configuration Reference; the config-sample comment lines model_context_window = 128000 and model_auto_compact_token_limit = 64000, whose stated defaults are auto for model and unset uses model defaults; the field note in config-schema.json, Size of the context window for the model, in tokens.; the API model page's 1,050,000 context window, 128,000 max output tokens and its rule that prompts above 272K input tokens are billed at 2x input and cache rates and 1.5x output for the full request; the Standard row for gpt-6.1-sol in the official price list, $2.00 / $0.10 / $2.50 / $10.00 for short context and $4.00 / $0.20 / $5.00 / $15.00 for long context per 1M tokens; the Codex changelog headings dated 2026-09-29 and 2026-10-08; and OpenCode's v2.0.27 entry of October 12, 2026 with its 500,000 tokens sentence.

Unverified and not published by the vendor

As of 2026-10-13 OpenAI has not published a default context window for GPT-6.1 Sol in Codex. Searched, with no such statement found: the Codex Configuration Reference, config-basic, config-advanced, config-sample, config-schema.json, the Codex changelog and the Codex models and model-selection pages on developers.openai.com, plus two help.openai.com Codex articles (viewed through web.archive.org). Numbers circulating in community posts, 500K or 258K, are not vendor values: 500,000 appears only in OpenCode's own changelog as OpenCode's input limit, and 258K is not even the documented example (the docs use 128000). On the subscription allowance, the OpenAI help center says usage depends on the model, where the task runs, task complexity, context, reasoning, speed and tools, and that a long-running task can use substantially more than a short request.

When client ceilings disagree

Codex config keys

The docs hand you keys, not numbers. model_context_window can be set by you, and when unset Codex follows model or preset defaults (Optional manual model metadata. When unset, Codex uses model or preset defaults.). Close to the ceiling, model_auto_compact_token_limit triggers automatic history compaction; the Codex changelog words it as Context compaction automatically summarizes the session as it approaches the context window limit. What a given session really uses has to be measured in that client.

Third-party clients such as OpenCode

A client's own input ceiling can differ from the API's: OpenCode raised the ChatGPT OAuth input limit for gpt-6.1-sol and gpt-6.1-sol-fast to 500,000 tokens in v2.0.27. That is OpenCode product behaviour: not a Codex default, and not the 1,050,000 context window listed on the API model page. Compare ceilings only against each vendor's own changelog and docs.

The three keys you can set

Transcribed from the official docs. (1) Context window: the Configuration Reference line reads model_context_window number Context window tokens available to the active model.; config-advanced shows model_context_window = 128000 # Context window size; the matching comment in config-sample adds tokens; default: auto for model. (2) Auto-compaction threshold: model_auto_compact_token_limit number Token threshold that triggers automatic history compaction (unset uses model defaults)., with the config-sample comment model_auto_compact_token_limit = 64000 # tokens; unset uses model defaults. (3) What it counts: model_auto_compact_token_limit_scope takes total or body_after_prefix, and the official description says the threshold covers the full active context (total, the default) or only growth after the carried compaction-window prefix. The config-sample comment line is model_auto_compact_token_limit_scope = "total". All three sit in the same top-level example block as model_provider. The docs publish no default figure for GPT-6.1 Sol.

On QCode

On QCode you can call gpt-6.1-sol, and the ID is written exactly as gpt-6.1-sol. For Codex, follow docs.qcode.cc: in config.toml set base_url = "https://api.qcode.cc/openai" together with wire_api = "responses"; the docs describe wire_api as the protocol field and say Codex uses responses. The credential is your QCode key starting with cr_, placed in OPENAI_API_KEY inside ~/.codex/auth.json or in the environment variable named by env_key (the docs define env_key as the environment variable Codex reads the key from). Tools that only speak the OpenAI Chat protocol take https://api.qcode.cc/openai/v1. Set the context window and the compaction threshold with the Codex keys above. Billed per token; per-model rates are listed on /models. For the GPT family, once one request's input (cache hits included) passes 272K tokens the whole request is billed at 2x for input and cache reads and 1.5x for output, and the gpt-6.1-sol row on /models lists both sides of 272K.

Frequently asked questions

What is the default context window for GPT-6.1 Sol in Codex?

OpenAI has not published one. As of 2026-10-13 the official Codex docs and changelog define model_context_window and model_auto_compact_token_limit but give no default context figure for GPT-6.1 Sol in Codex; the only thing checkable in config-sample is that when the key is unset the value used is default: auto for model. If you need a fixed number, set model_context_window yourself.

Which official default is 258K?

None of them. 258K does not appear as a default in the Codex documentation and changelog searched. The context-related numbers the official pages publish are the documented examples 128000 (model_context_window) and 64000 (model_auto_compact_token_limit), the API model page's 1,050,000 context window with 128,000 max output tokens, and the 272K pricing threshold. 258K is none of them and has no source; building a config or a cost model around it is unsupported.

Is 272K a context ceiling or a pricing threshold?

A pricing threshold. The official model page states Prompts with more than 272K input tokens are priced at 2x input and cache rates and 1.5x output for the full request. It does not cap the context: the same page lists a 1,050,000 context window and 128,000 max output tokens for gpt-6.1-sol.

Where does the 500K figure come from?

From OpenCode's own changelog. Version v2.0.27, dated October 12, 2026, reads Raised the ChatGPT OAuth input limit for gpt-6.1-sol and gpt-6.1-sol-fast to 500,000 tokens. It is the ceiling OpenCode set for its ChatGPT OAuth path, not a Codex default and not an OpenAI announcement.

Which keys do I use to set the window and the compaction threshold myself?

The three documented keys in 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 defaults when unset) and model_auto_compact_token_limit_scope (total by default; body_after_prefix counts only growth after the carried compaction-window prefix). The documented examples are 128000 and 64000.

How do I pay and activate from mainland China?

With Alipay or WeChat Pay, fully self-service. The recharge page lists Alipay, WeChat Pay, credit cards (Visa / Mastercard / AMEX), Apple Pay, Google Pay and cryptocurrency across many coins and networks; after a top-up you activate it yourself and the balance is usable immediately, with no manual approval. Billed per token; per-model rates are listed on /models.

Sources

OpenAI side, all captured 2026-10-13: developers.openai.com's Codex Configuration Reference, config-basic, config-advanced, config-sample and config-schema.json, the Codex changelog, and the Codex models and model-selection pages; the API gpt-6.1-sol model page, the pricing table, the API changelog and the Compaction guide; plus two help.openai.com Codex articles (viewed through web.archive.org). OpenCode side: the official opencode.ai changelog, captured 2026-10-13. QCode side: docs.qcode.cc pages for Codex setup, endpoints and API paths, and payment methods, plus the live qcode.cc pages /models, /recharge and /pricing, all captured 2026-10-13.

Set the window and the compaction threshold yourself

Point Codex at https://api.qcode.cc/openai with wire_api = "responses" and call gpt-6.1-sol. Billed per token; per-model rates are listed on /models.

Try first, then decide

Not sure which tier? Start with Starter ($8.57/mo) and upgrade when you're happy — the unused value of the old plan goes back to your balance.