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
What is the specific context size of Github Copilot, is it only 128K? #16129
Github copilot has custom limits for different models, usually 128k but not always. 4o only has 64k, and some codex models get 272k, this is basically only visible in the model picker in the VScode extension of Copilot
This does impact the model, but less than you would think.
Usually the performance degrades rapidly after about 100k - 120k context used. I have both an anthropic key and Copilot, and using Opus through both I find that I usually compact / restart sessions before 128k context is filled anyway
@jeroenev
I don't have a Copilot subscription, so I can only test the following two models. Haiku should have 200K, and GPT-5-mini should have 272K, but when I run /context in the Copilot CLI, both only show 160K. Could it be that they increased the context size? Is the maximum now 160K? Can you test what the total context size shows when running /context with Sonnet or Opus?
Seems like they increased the context recently, just 2 weeks ago this was 128k for most models:
Will the context size in OpenCode be increased as well? I' m using OMO plugin, the auto compaction will be triggered frequently if the task is complex with 128K context size.
@tlerbao works for me with Opus 4.6. I don't know if/when I'll check other models and this is definitely temporary config until models.dev gets updated
Cause it seems the way opencode is trying to get some metadata from Copilot concening models is outdated . I guess it will be fixed soon . But you can use an already existing plugin to fix this by yourself. Just add in you opencode.json file : "plugin": [ "@zhzy0077/opencode-copilot-cli-auth@0.0.16" ]
i did but still getting only 128k on Opus 4.6? already removed and added provider again
Cause it seems the way opencode is trying to get some metadata from Copilot concening models is outdated . I guess it will be fixed soon . But you can use an already existing plugin to fix this by yourself. Just add in you opencode.json file : "plugin": [ "@zhzy0077/opencode-copilot-cli-auth@0.0.16" ]
i did but still getting only 128k on Opus 4.6? already removed and added provider again
Strange , it's working for me , for opus 4.6
btw , it seems there's some commits added today for this problem
I would be inclined to say to use the @zhzy0077/opencode-copilot-cli-auth if it actually pulls the values from API but the plugin is currently broken (subagents fail with invalid initiator error) so I'd rather see this officially supported by opencode at some point (and I'll just continue running with my custom overrides in opencode.json)
@d4rky-pl
Thank you so much! I tried @zhzy0077/opencode-copilot-cli-auth myself, but for the opus-4.6 model, the usage percentage shown in the top-right corner during runtime calculates back to a limit of 144k. This is consistent with the update on models.dev (discussed in anomalyco/models.dev#1136). So what should I do now? Should I configure it like this in opencode.json?
But you mentioned that the API results for business pro show "max_context_window_tokens": 200000 and "max_output_tokens": 32000.
Also, thank you so much for pointing out that the plugin is currently broken (subagents fail with invalid initiator error). I was assigning tasks to the subagent, and it kept showing "delegating." I searched through the issues for a long time without finding the reason, and now I finally know why.
Activity
github-actions commentedon Mar 5, 2026
This issue might be a duplicate of existing issues. Please check:
These issues cover the same underlying question about GitHub Copilot's context window limitations in OpenCode.
jeroenev commentedon Mar 5, 2026
Usually the performance degrades rapidly after about 100k - 120k context used. I have both an anthropic key and Copilot, and using Opus through both I find that I usually compact / restart sessions before 128k context is filled anyway
tlerbao commentedon Mar 5, 2026
@jeroenev
I don't have a Copilot subscription, so I can only test the following two models. Haiku should have 200K, and GPT-5-mini should have 272K, but when I run
/contextin the Copilot CLI, both only show 160K. Could it be that they increased the context size? Is the maximum now 160K? Can you test what the total context size shows when running/contextwith Sonnet or Opus?jeroenev commentedon Mar 5, 2026
Seems like they increased the context recently, just 2 weeks ago this was 128k for most models:
tlerbao commentedon Mar 6, 2026
@jeroenev May I ask which software this screenshot is from or where you saw it? Thank you.
jeroenev commentedon Mar 6, 2026
That is in VS-code, in the Agent Chat panel from Github Copilot
Click the model selector -> More models -> Manage models
tlerbao commentedon Mar 6, 2026
@jeroenev Thank you, this makes it more transparent. It seems the 1M model won't be available for Copilot pricing in the near future.
hjnnjh commentedon Mar 8, 2026
Will the context size in OpenCode be increased as well? I' m using OMO plugin, the auto compaction will be triggered frequently if the task is complex with 128K context size.
TomLucidor commentedon Mar 9, 2026
Similar problem on OpenCode failing to "phone home" to check provider context size #16709
d4rky-pl commentedon Mar 10, 2026
If you don't feel like waiting keep in mind the context size limit can be adjusted in
opencode.json:I give no guarantees this will work correctly and that the values are right, I just mapped what I saw in vscode and I'm dogfooding it right now.
tlerbao commentedon Mar 10, 2026
@d4rky-pl Looking forward to the results of your test.
d4rky-pl commentedon Mar 10, 2026
@tlerbao works for me with Opus 4.6. I don't know if/when I'll check other models and this is definitely temporary config until models.dev gets updated
tlerbao commentedon Mar 10, 2026
@d4rky-pl Where can I receive the official updates about this configuration as soon as possible?
12 remaining items
krasen1234 commentedon Mar 17, 2026
Any fix sirs? this should be
i did but still getting only 128k on Opus 4.6? already removed and added provider again
SadE54 commentedon Mar 17, 2026
Strange , it's working for me , for opus 4.6
btw , it seems there's some commits added today for this problem
SadE54 commentedon Mar 23, 2026
With 1.3 it seems I got a ~140K for Claude models , still not the 200k 🤔
tlerbao commentedon Mar 23, 2026
The latest API results seem to indicate that Sonnet is 200k, while Opus is only 144k.
SadE54 commentedon Mar 23, 2026
Yeah , I checked with Sonnet , and got the same. it's kind a progress 😅
tlerbao commentedon Mar 23, 2026
But it seems everyone prefers using opus more, haha.
d4rky-pl commentedon Mar 23, 2026
The API results are weird compared to what vscode displays:
vs
tlerbao commentedon Mar 23, 2026
@d4rky-pl @SadE54
Yes, the API and VS Code display differently.
What type of subscription do you have? Could it be related to the subscription type?
d4rky-pl commentedon Mar 23, 2026
@tlerbao individual Pro+
Here's the API results for business Pro:
FYI @rekram1-node ^
I would be inclined to say to use the
@zhzy0077/opencode-copilot-cli-authif it actually pulls the values from API but the plugin is currently broken (subagents fail with invalid initiator error) so I'd rather see this officially supported by opencode at some point (and I'll just continue running with my custom overrides inopencode.json)enterlet commentedon Mar 26, 2026
@d4rky-pl
Thank you so much! I tried @zhzy0077/opencode-copilot-cli-auth myself, but for the opus-4.6 model, the usage percentage shown in the top-right corner during runtime calculates back to a limit of 144k. This is consistent with the update on models.dev (discussed in anomalyco/models.dev#1136). So what should I do now? Should I configure it like this in opencode.json?
"claude-opus-4.6": { "limit": { "context": 192000, "output": 64000 } }
But you mentioned that the API results for business pro show "max_context_window_tokens": 200000 and "max_output_tokens": 32000.
Also, thank you so much for pointing out that the plugin is currently broken (subagents fail with invalid initiator error). I was assigning tasks to the subagent, and it kept showing "delegating." I searched through the issues for a long time without finding the reason, and now I finally know why.
krasen1234 commentedon Mar 27, 2026
Im confused but is there a fix implemented already for this?
jensenojs commentedon Mar 28, 2026
I'm still a little confused.
rekram1-node commentedon May 13, 2026
we sync directly from copilot apis in opencode and fallback to models.dev so the context limits match what they let u access fro their plan