You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: GitHub Copilot Claude models have wrong context limits and missing thinking variants #20317
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
Activity
github-actions commentedon Mar 31, 2026
This issue might be a duplicate of existing issues. Please check:
fix(opencode): correct GitHub Copilot Claude context limits and think…
mugnimaestra commentedon 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 --refreshto get the latest info from copilot APIsee anomalyco/models.dev#1136 (comment) for reference
keith-pw commentedon 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 commentedon Apr 3, 2026
Any solution to that? I also experience that.
keith-pw commentedon 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 commentedon Apr 8, 2026
Copilot's context window size is smaller than Anthropic official. You can check it out in VSCode.