GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: enable 1M context window for Anthropic Claude models by mguttmann · Pull Request #13457 · anomalyco/opencode

Conversation

@mguttmann

@mguttmann mguttmann commented Feb 13, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Summary

  • Add optional 1m variant for Claude Opus 4.6 that enables the 1M token context window
  • Users can select this variant in the model selector (e.g., claude-opus-4-6[1m]) to opt-in to extended context
  • Default context remains at 200K to avoid higher session costs

Details

This PR makes the 1M context window opt-in rather than automatic. The context-1m-2025-08-07 header is sent to enable the feature on Anthropic's side, but the actual context limit is only increased when the user explicitly selects the [1m] variant.

Why optional?

The 1M context window uses higher token pricing (context_over_200k tier) and delays compaction. Making it opt-in lets users choose when they need the extended context vs. when they prefer lower costs with automatic compaction at 200K.

Changes

  • transform.ts: Add 1m variant for Opus 4.6 with contextLimit: 1_000_000
  • transform.ts: Add contextLimit() helper to resolve effective limit from variant
  • compaction.ts: Update isOverflow() to use variant-aware context limit
  • processor.ts / prompt.ts: Pass variant to overflow checks

Usage

# Default (200K context, lower cost)
/model anthropic/claude-opus-4-6

# Extended context (1M, higher cost)  
/model anthropic/claude-opus-4-6[1m]

Note to reviewers: This supersedes the approach in #12342 which enabled 1M by default. The optional variant approach gives users control over the cost/context tradeoff.

Closes #13455

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@github-actions

github-actions Bot commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Based on my search, I found one potentially related PR:

Related PR:

  • feat(provider): add adaptive thinking and 1M context support for Claude Opus 4.6 #12342: feat(provider): add adaptive thinking and 1M context support for Claude Opus 4.6
    • URL: feat(provider): add adaptive thinking and 1M context support for Claude Opus 4.6 #12342
    • This PR appears to be related as it also addresses 1M context support for Claude models (specifically Opus 4.6), which overlaps with the scope of PR feat: enable 1M context window for Anthropic Claude models #13457

The current PR (#13457) is a more comprehensive approach that enables 1M context support for all Anthropic Claude models with the context_over_200k pricing tier, whereas #12342 was focused on adding this support for Claude Opus 4.6 specifically. Depending on the status of #12342, it may have already been merged or superseded by this broader implementation.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Claude Agent
feat: add optional 1M context window variant for Claude Opus 4.6
a5f3af8
Add a '1m' variant for Opus 4.6 models that enables the 1M token context
window. Users can select this variant in the model selector to use the
extended context (e.g., claude-opus-4-6[1m]).

Changes:
- Add '1m' variant with contextLimit: 1_000_000 for Opus 4.6 models
- Add contextLimit() helper to resolve effective context limit from variant
- Update isOverflow() to consider variant-based context limits
- Keep anthropic-beta header with context-1m flag (enables the feature)
- Default context remains at 200K to avoid higher costs unless explicitly chosen

Closes #13455
@mguttmann

mguttmann commented Feb 13, 2026

Copy link
Copy Markdown
Author

@github-actions Thanks for finding the related PR!

Regarding #12342 (feat: add adaptive thinking and 1M context support for Claude Opus 4.6):

This PR takes a different approach by making 1M context opt-in via a variant rather than enabling it by default. Here's why:

Key differences from #12342:

Aspect #12342 This PR
1M context Always enabled Opt-in via [1m] variant
Default behavior 1M context, delayed compaction 200K context, normal compaction
User control None Full control via variant selection
Cost impact Higher by default User chooses when to pay more

Why opt-in is better:

  1. Cost control: 1M context uses the context_over_200k pricing tier which is significantly more expensive
  2. Session management: With 1M default, compaction triggers much later, leading to longer sessions that can exceed rate limits
  3. User choice: Some tasks need extended context, others don't — users should decide

The implementation adds a [1m] variant that users can select when they specifically need the extended context window, similar to how thinking effort variants ([high], [max]) work.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mguttmann

mguttmann commented Feb 13, 2026

Copy link
Copy Markdown
Author

Closing - the context-1m beta is not available for all subscriptions, so this would break the experience for most users.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mguttmann mguttmann closed this Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Enable 1M context window for Anthropic Claude models

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@mguttmann
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.