Skip to content

openai_subscribed: Use full context windows for subscription models - #62502

Merged
eholk merged 1 commit into
mainfrom
increase-openai-subscription-context-window
Aug 11, 2026
Merged

openai_subscribed: Use full context windows for subscription models#62502
eholk merged 1 commit into
mainfrom
increase-openai-subscription-context-window

Conversation

@eholk

@eholk eholk commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

ChatGPT subscription models currently report the short-context billing thresholds (272k or 372k tokens) as their maximum context windows. Those thresholds matter when Zed is paying metered API costs, but subscription requests are billed directly by OpenAI.

This updates the subscribed models to report the full context windows supported by the corresponding public API models: 1.05M tokens for GPT-5.4, GPT-5.5, and GPT-5.6, and 400k tokens for GPT-5.4 Mini. It also reports the 128k output limit so context accounting reserves capacity for the response. Request serialization is unchanged; the unsupported max_output_tokens parameter is still omitted from requests to the Codex backend.

Release Notes:

  • Improved context window usage for GPT models accessed through a ChatGPT subscription.

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Aug 11, 2026
@zed-community-bot zed-community-bot Bot added the staff Pull requests authored by a current member of Zed staff label Aug 11, 2026
@eholk
eholk force-pushed the increase-openai-subscription-context-window branch from cffe8f1 to 5f20877 Compare August 11, 2026 21:28
@eholk
eholk enabled auto-merge August 11, 2026 21:34
@eholk
eholk added this pull request to the merge queue Aug 11, 2026
Merged via the queue into main with commit 6bd93fc Aug 11, 2026
36 checks passed
@eholk
eholk deleted the increase-openai-subscription-context-window branch August 11, 2026 21:44
pull Bot pushed a commit to Mu-L/zed that referenced this pull request Aug 12, 2026
PR zed-industries#62502 changed the ChatGPT subscription models to report the
corresponding public API context windows. That was based on a mistaken
assumption: subscription requests go through the separate Codex backend,
which still rejects requests around the previous context limit.

Because the advertised context window also determines when Zed compacts
a conversation, reporting 1.05M tokens delays compaction until after the
Codex backend rejects the request. This reverts zed-industries#62502 and restores the
previous conservative limits. Longer term, we should load the
account-specific model metadata from the Codex `/models` endpoint rather
than maintaining this list by hand.

Release Notes:

- Fixed automatic context compaction for GPT models accessed through a
ChatGPT subscription.
playdohface pushed a commit to playdohface/zed that referenced this pull request Aug 29, 2026
…ed-industries#62502)

ChatGPT subscription models currently report the short-context billing
thresholds (272k or 372k tokens) as their maximum context windows. Those
thresholds matter when Zed is paying metered API costs, but subscription
requests are billed directly by OpenAI.

This updates the subscribed models to report the full context windows
supported by the corresponding public API models: 1.05M tokens for
GPT-5.4, GPT-5.5, and GPT-5.6, and 400k tokens for GPT-5.4 Mini. It also
reports the 128k output limit so context accounting reserves capacity
for the response. Request serialization is unchanged; the unsupported
`max_output_tokens` parameter is still omitted from requests to the
Codex backend.

Release Notes:

- Improved context window usage for GPT models accessed through a
ChatGPT subscription.
playdohface pushed a commit to playdohface/zed that referenced this pull request Aug 29, 2026
PR zed-industries#62502 changed the ChatGPT subscription models to report the
corresponding public API context windows. That was based on a mistaken
assumption: subscription requests go through the separate Codex backend,
which still rejects requests around the previous context limit.

Because the advertised context window also determines when Zed compacts
a conversation, reporting 1.05M tokens delays compaction until after the
Codex backend rejects the request. This reverts zed-industries#62502 and restores the
previous conservative limits. Longer term, we should load the
account-specific model metadata from the Codex `/models` endpoint rather
than maintaining this list by hand.

Release Notes:

- Fixed automatic context compaction for GPT models accessed through a
ChatGPT subscription.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants