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
GH Copilot has recently updated the context size of all or almost of the models.
After seeing PR #1104 being closed then found out PR #810 , It seems they may have finally sorted out the official context size (no output/input column).
I don't know how/where @rekram1-node is working on it (or anybody else), I just hope that the current limit setup is indicative and don't force compaction when there is a context size window a lot larger available
Here is my contribution from my Business account if it can help :
I can confirm that at least for Opus 4.6 the new context sizes are not limited to just vsc / copilot cli but also work fine in opencode (I tweaked opencode.json to increase them and been running since yesterday with no issues)
@slhad the documentation for opencode.json is unfortunately very poorly maintained. The entire schema for the file is available under https://opencode.ai/config.json and includes all the undocumented features as long as you either are OK with analyzing the file yourself or you ask AI to do it for you. Or, in this case, you can try using the config I shared in opencode issue. It works for me but I don't "vibe code" and have auto-compaction enabled disabled (edit: typo, long day) so YMMV.
Please be aware that I give zero guarantees, I do not provide support, I will not keep this trick up to date if anything changes and I'm not a maintainer of this project.
The issue you linked seems to have nothing to do with Copilot (which never provided 1M context window) but it's hard to say because the reporter seems to be very confused about things.
but at the same time I already confirmed multiple times that I can comfortably hit at least 180K context (as measured by opencode so I may be misunderstanding something). The script you shared makes you pretend to be vscode, maybe the issue is with the version it presents itself as? 🤔
@rekram1-node I only now realized that VSC changed the way it's displaying the context size between versions which may be why it's so confusing.
edit: and after re-reading the issue I see it was mentioned at the very top 🤦
VSC version 1.109.5
VSC 1.110
They seem to be displaying the "Context Size" as Input + Output now.
At the same time with the override in opencode.json I comfortably hit this (with compaction disabled):
...but I admit I may just as well be misunderstanding what I'm seeing here. With auto-compaction enabled it usually hit the threshold at around 90-100K before but it could be due to other bugs.
For comparison, Copilot CLI:
If I can help in any way let me know, otherwise I'll stop making extra noise
Indeed adding "prompt_tokens" and "output_tokens" seems to be the context value displayed (if we ignore Grok and Gemeni models which seems to have a 19K tokens deducted for what ever reason)
And I guess the context shown in VSCode's "chat: Manage LMs" maybe the lower on of max_context_window_tokens and max_prompt_tokens + max_output_tokens.
With VS Code 1.112.0 / Github Copilot Chat 0.40.1 , I have "The reserved for response" part now, seems a lot like 64K tokens for GPT-5-mini (192K tokens) and 128K for GPT-5.4 (400K) corresponding to the max_output_tokens
It's still the same context size as last screenshot of @paolomainardi Language Models
Okay based on some preliminary testing, this pr seems correct^^ if ur hitting issues with it lmk. I am gonna merge it, if u are using opencode (once this pr deploys) you can immediately refresh ur model list by running
@rekram1-node Does that mean I don't need to set parameters like limit.context/.output/.input for each model with the provider github-copilot in the configuration file?
Activity
d4rky-pl commentedon Mar 11, 2026
I can confirm that at least for Opus 4.6 the new context sizes are not limited to just vsc / copilot cli but also work fine in opencode (I tweaked
opencode.jsonto increase them and been running since yesterday with no issues)slhad commentedon Mar 11, 2026
so we do need to tweak them manually for now ? I did not find anything in https://opencode.ai/docs/models/ for that, how did you do it @d4rky-pl ?
Other issues like anomalyco/opencode#16308 seem to indicate there are bugs preventing us to do that
d4rky-pl commentedon Mar 11, 2026
@slhad the documentation for
opencode.jsonis unfortunately very poorly maintained. The entire schema for the file is available under https://opencode.ai/config.json and includes all the undocumented features as long as you either are OK with analyzing the file yourself or you ask AI to do it for you. Or, in this case, you can try using the config I shared in opencode issue. It works for me but I don't "vibe code" and have auto-compactionenableddisabled (edit: typo, long day) so YMMV.Please be aware that I give zero guarantees, I do not provide support, I will not keep this trick up to date if anything changes and I'm not a maintainer of this project.
The issue you linked seems to have nothing to do with Copilot (which never provided 1M context window) but it's hard to say because the reporter seems to be very confused about things.
rekram1-node commentedon Mar 11, 2026
I think for some of this opencode just needs to sync models based on ur account/org froom the github models endpoint.
I'm looking at the model limits from the api and I don't see these values.
rekram1-node commentedon Mar 11, 2026
This is the script I use to sync:
d4rky-pl commentedon Mar 11, 2026
@rekram1-node I think it may be an issue with your script, I see the same results:
but at the same time I already confirmed multiple times that I can comfortably hit at least 180K context (as measured by opencode so I may be misunderstanding something). The script you shared makes you pretend to be vscode, maybe the issue is with the version it presents itself as? 🤔
I'll also try to poke at this a bit more
d4rky-pl commentedon Mar 11, 2026
@rekram1-node I only now realized that VSC changed the way it's displaying the context size between versions which may be why it's so confusing.
edit: and after re-reading the issue I see it was mentioned at the very top 🤦
VSC version 1.109.5
VSC 1.110
They seem to be displaying the "Context Size" as Input + Output now.
At the same time with the override in
opencode.jsonI comfortably hit this (with compaction disabled):...but I admit I may just as well be misunderstanding what I'm seeing here. With auto-compaction enabled it usually hit the threshold at around 90-100K before but it could be due to other bugs.
For comparison, Copilot CLI:
If I can help in any way let me know, otherwise I'll stop making extra noise
slhad commentedon Mar 11, 2026
Indeed adding "prompt_tokens" and "output_tokens" seems to be the context value displayed (if we ignore Grok and Gemeni models which seems to have a 19K tokens deducted for what ever reason)
Easier to see with that addition
rekram1-node commentedon Mar 12, 2026
The script isn't wrong it's pulling directly from their api, but yeah I see what u mean. Ill play w/ their limit see what happens
hugefiver commentedon Mar 12, 2026
@rekram1-node
I am the author of #1104. Here is my command for fetching the model list from the Copilot API, and the file changes were made by LLM.
And I guess the
contextshown in VSCode's "chat: Manage LMs" maybe the lower on ofmax_context_window_tokensandmax_prompt_tokens + max_output_tokens.tlerbao commentedon Mar 16, 2026
I didn't quite understand the content of your discussion; my English is poor.
Does it mean that Copilot still has a 128K context, but the display method has changed, showing the input and output limits together?
@d4rky-pl @slhad @hugefiver @rekram1-node @crankycoder
slhad commentedon Mar 16, 2026
From what I see within VS Code with Opus 4.6, context window is the one advertised
Right now after quite some subagents and sumarizations, Opus 4.6 stopped at
And they changed again the context size displayed (I did not recheck API data directly), probably with 1.111.0
tlerbao commentedon Mar 16, 2026
@slhad Seems like good news, but Claude's official version already supports 1M context, so GitHub still has some catching up to do.
paolomainardi commentedon Mar 17, 2026
How did you configure the input and output tokens? willing to share the config ?
Anyway, I confirm I can see the same context window on my business account too:
paolomainardi commentedon Mar 17, 2026
I see this running the script on the business account:
fix(opencode): override Copilot model context/output limits from API
feat(opencode): add copilot-models script and sjust recipe to check m…
fix(opencode): address copilot-models.mjs review feedback
fix(opencode): override Copilot model context/output limits and add c…
feat(opencode): add --update flag to copilot-models script for auto-f…
feat(opencode): add --update flag to copilot-models script for auto-f…
tlerbao commentedon Mar 17, 2026
@paolomainardi Interestingly, the data I obtained using this script shows that opus4.6 is 144,000 and sonnet4.6 is 200,000.,wtf
slhad commentedon Mar 18, 2026
With VS Code 1.112.0 / Github Copilot Chat 0.40.1 , I have "The reserved for response" part now, seems a lot like 64K tokens for GPT-5-mini (192K tokens) and 128K for GPT-5.4 (400K) corresponding to the max_output_tokens
It's still the same context size as last screenshot of @paolomainardi Language Models
rekram1-node commentedon Mar 20, 2026
This is complete sync from their api:
#1235
rekram1-node commentedon Mar 20, 2026
Okay based on some preliminary testing, this pr seems correct^^ if ur hitting issues with it lmk. I am gonna merge it, if u are using opencode (once this pr deploys) you can immediately refresh ur model list by running
opencode models --refresh
tlerbao commentedon Mar 21, 2026
@rekram1-node Does that mean I don't need to set parameters like limit.context/.output/.input for each model with the provider github-copilot in the configuration file?
rekram1-node commentedon Mar 24, 2026
you never should have needed to