anomalyco / anomalyco/opencode
[FEATURE]: Expose opt-in 1M context variants for GPT-5.6 OAuth
@jlongster is already working on this.
Since Sep 1, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
The Codex OAuth backend now supports a 1,000,000-token context window for GPT-5.6 models. However, OpenCode still applies the previous 400,000 context / 272,000 input / 128,000 output limits to these models when OpenAI OAuth is used, preventing users from using the longer context window through OpenCode.
This is different from the public OpenAI API, which exposes a 1,050,000-token context window. The Codex OAuth backend supports 1,000,000 tokens instead, leaving a maximum input budget of 872,000 tokens when 128,000 tokens are reserved for output.
I have verified the 1,000,000 context / 872,000 input / 128,000 output limits through actual testing in Codex.
References:
- Codex long-context announcement:
https://x.com/thsottiaux/status/2089143488696705077 - Public OpenAI API limits:
https://developers.openai.com/api/docs/models/gpt-5.6-sol
I propose keeping the existing GPT-5.6 OAuth models and limits unchanged as the default while adding explicit, selectable -1m variants.
Proposed behavior:
- Keep the existing GPT-5.6 OAuth models at 400K context / 272K input / 128K output.
- Add opt-in
-1mvariants for GPT-5.6 Sol, Terra, Luna, and their Fast variants. - Configure the new variants with 1M context / 872K input / 128K output.
- Resolve the default and
-1mvariants to the same underlying OpenAI model ID. - Preserve the existing model options and reasoning variants.
- Do not affect GPT-5.5 or API-key authentication.
- Allow users to switch back to the existing default models at any time.
I already have a focused local implementation with tests covering the default models, the new -1m variants, their limits, and their underlying API model IDs.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.