GeezerVison is showing github.com — fix: GitHub Copilot Claude models have wrong context limits and missing thinking variants · Issue #20317 · anomalyco/opencode
fix: GitHub Copilot Claude models have wrong context limits and missing thinking variants #20317Labels coreAnything pertaining to core functionality of the application (opencode server stuff) DescriptionBug
GitHub Copilot Claude models report incorrect context window sizes and only expose a single thinking variant instead of adaptive effort levels.
Context window sizes are wrong
models.dev (the upstream data source opencode uses) has incorrect context and output values for several Claude models when accessed via the GitHub Copilot provider. For example:
| Model |
models.dev says |
Correct (Anthropic docs) |
claude-opus-4.6 |
context=144k, output=64k |
context=1M, output=128k |
claude-sonnet-4.6 |
context=200k, output=32k |
context=1M, output=64k |
claude-haiku-4.5 |
context=144k, output=32k |
context=200k, output=64k |
claude-opus-4.5 |
context=160k, output=32k |
context=200k, output=32k |
claude-sonnet-4.5 |
context=144k, output=32k |
context=200k, output=64k |
claude-sonnet-4 |
context=216k, output=32k |
context=200k, output=16k |
claude-opus-41 |
context=80k, output=32k |
context=200k, output=32k |
Thinking variants are missing
The variants() function in transform.ts has a @ai-sdk/github-copilot case that returns only a single hardcoded thinking variant for Claude models. Direct Anthropic Claude models correctly expose low/medium/high/max adaptive effort levels — GitHub Copilot Claude models should too.
How to reproduce
- Configure opencode with a GitHub Copilot subscription
- Select any Claude model (e.g.
claude-opus-4.6)
- Observe the reported context window is wrong (144k vs 1M)
- Observe only one thinking toggle is shown instead of low/medium/high/max
Expected behavior
- Correct context/output limits per Anthropic's official documentation
- Adaptive thinking variants (low/medium/high/max) for
claude-opus-4.6 and claude-sonnet-4.6; high/max for other Claude models via Copilot
References
Reacted by Murray Wood, keith-pw, ZhengFangFunz, tehort, Nenormalniy, Hieu Minh Nguyen, Sjeng Pho, Phùng Xuân Anh and Bogdan Activityadded coreAnything pertaining to core functionality of the application (opencode server stuff) on Mar 31, 2026github-actions commented on Mar 31, 2026 This issue might be a duplicate of existing issues. Please check:
added a commit that references this issue on Mar 31, 2026This issue will close once commit 65eedde is merged into the 'dev' branch.65eedde mugnimaestra commented on Apr 1, 2026 I believe that github copilot claude models have some custom adjustment for the context window (they don't have the 1M token window yet I guess?)
but it's true that I saw that in copilot cli the reasoning effort are put in low/med/high now
and turns out different account type of github copilot has different context window
it needs to run opencode models --refresh to get the latest info from copilot API
see anomalyco/models.dev#1136 (comment) for reference keith-pw commented on Apr 1, 2026 Observing this same issue. I suppose we wont get 1M context but it should be whats shown in VS Code Copilot:
 IlyaMaksheev commented on Apr 3, 2026 Any solution to that? I also experience that. keith-pw commented on Apr 4, 2026 Looks like this now works as expected. Shows 200k context for Opus 4.6 for me.
Note that the limits vary depending on your GHCP subscription - trial accounts for instance have a 144k context window for Opus 4.6.
Opencode Desktop + GHCP Enterprise Pro plan:
 Mapleshade20 commented on Apr 8, 2026 Copilot's context window size is smaller than Anthropic official. You can check it out in VSCode.
MetadataMetadatacoreAnything pertaining to core functionality of the application (opencode server stuff) DevelopmentNo branches or pull requestsIssue actions
|