# openai_subscribed: Restore Codex context limits \(\#62515\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/315ea374107edcc571796f3dba656f6be9d09a3b)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 315ea374107edcc571796f3dba656f6be9d09a3b

Requested commit: 315ea374107edcc571796f3dba656f6be9d09a3b

Commit: 315ea374107edcc571796f3dba656f6be9d09a3b

Tree: 773c982e4d1f9700c62a6cf87706fae1e0274886

Author: Eric Holk

Committer: GitHub

## Message

```
openai_subscribed: Restore Codex context limits (#62515)

PR #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 #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.
```

## Parents

- [a3d6515381b925c0cee7ac518c2ee96330fa791f](https://git.cafe/gitcafe/zed/commit/a3d6515381b925c0cee7ac518c2ee96330fa791f?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/315ea374107edcc571796f3dba656f6be9d09a3b?format=markdown)
