Skip to content

What is the specific context size of Github Copilot, is it only 128K? #16129

Closed

Description

@tlerbao

Question

As the title says, I'm considering purchasing GitHub Copilot.

May I ask if GitHub Copilot's Claude model only has a 128K context size (whether used in VSCode or OpenCode)?

If it only has a 128K context, does that mean the model's capabilities are severely limited?

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Mar 5, 2026
  2. github-actions commented on Mar 5, 2026

    @github-actions
    Contributor

    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.

  3. jeroenev commented on Mar 5, 2026

    @jeroenev
    1. 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
    2. 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
  4. tlerbao commented on Mar 5, 2026

    @tlerbao
    Author

    @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?

    Image Image
  5. jeroenev commented on Mar 5, 2026

    @jeroenev

    Seems like they increased the context recently, just 2 weeks ago this was 128k for most models:

    Image
  6. tlerbao commented on Mar 6, 2026

    @tlerbao
    Author

    @jeroenev May I ask which software this screenshot is from or where you saw it? Thank you.

  7. jeroenev commented on Mar 6, 2026

    @jeroenev

    That is in VS-code, in the Agent Chat panel from Github Copilot
    Click the model selector -> More models -> Manage models

  8. tlerbao commented on Mar 6, 2026

    @tlerbao
    Author

    @jeroenev Thank you, this makes it more transparent. It seems the 1M model won't be available for Copilot pricing in the near future.

  9. hjnnjh commented on Mar 8, 2026

    @hjnnjh

    Seems like they increased the context recently, just 2 weeks ago this was 128k for most models:

    Image

    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.

  10. TomLucidor commented on Mar 9, 2026

    @TomLucidor

    Similar problem on OpenCode failing to "phone home" to check provider context size #16709

  11. d4rky-pl commented on Mar 10, 2026

    @d4rky-pl

    If you don't feel like waiting keep in mind the context size limit can be adjusted in opencode.json:

      "provider": {
        "github-copilot": {
          "models": {
            "claude-haiku-4.5": {
              "limit": { "context": 160000, "output": 32000 }
            },
            "claude-opus-4.5": {
              "limit": { "context": 160000, "output": 32000 }
            },
            "claude-opus-4.6": {
              "limit": { "context": 192000, "output": 64000 }
            },
            "claude-sonnet-4": {
              "limit": { "context": 144000, "output": 16000 }
            },
            "claude-sonnet-4.5": {
              "limit": { "context": 160000, "output": 32000 }
            },
            "claude-sonnet-4.6": {
              "limit": { "context": 160000, "output": 32000 }
            },
            "gemini-2.5-pro": {
              "limit": { "context": 173000, "output": 64000 }
            },
            "gemini-3-flash-preview": {
              "limit": { "context": 173000, "output": 64000 }
            },
            "gemini-3-pro-preview": {
              "limit": { "context": 173000, "output": 64000 }
            },
            "gemini-3.1-pro-preview": {
              "limit": { "context": 173000, "output": 64000 }
            },
            "gpt-4.1": {
              "limit": { "context": 128000, "output": 16384 }
            },
            "gpt-4o": {
              "limit": { "context": 68000, "output": 16384 }
            },
            "gpt-5-mini": {
              "limit": { "context": 192000, "output": 64000 }
            },
            "gpt-5.1": {
              "limit": { "context": 192000, "output": 64000 }
            },
            "gpt-5.1-codex": {
              "limit": { "context": 256000, "output": 128000 }
            },
            "gpt-5.1-codex-max": {
              "limit": { "context": 256000, "output": 128000 }
            },
            "gpt-5.1-codex-mini": {
              "limit": { "context": 256000, "output": 128000 }
            },
            "gpt-5.2": {
              "limit": { "context": 192000, "output": 64000 }
            },
            "gpt-5.2-codex": {
              "limit": { "context": 400000, "output": 128000 }
            },
            "grok-code-fast-1": {
              "limit": { "context": 173000, "output": 64000 }
            }
          }
        },

    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.

  12. tlerbao commented on Mar 10, 2026

    @tlerbao
    Author

    @d4rky-pl Looking forward to the results of your test.

  13. d4rky-pl commented on Mar 10, 2026

    @d4rky-pl

    @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

  14. tlerbao commented on Mar 10, 2026

    @tlerbao
    Author

    @d4rky-pl Where can I receive the official updates about this configuration as soon as possible?

  15. 12 remaining items

  16. krasen1234 commented on Mar 17, 2026

    @krasen1234

    Any fix sirs? this should be

    @SadE54 Why doesn't my copilot cli have 200K

    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

  17. SadE54 commented on Mar 17, 2026

    @SadE54

    Any fix sirs? this should be

    @SadE54 Why doesn't my copilot cli have 200K

    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

    Image

    btw , it seems there's some commits added today for this problem

  18. SadE54 commented on Mar 23, 2026

    @SadE54

    With 1.3 it seems I got a ~140K for Claude models , still not the 200k 🤔

  19. tlerbao commented on Mar 23, 2026

    @tlerbao
    Author

    With 1.3 it seems I got a ~140K for Claude models , still not the 200k 🤔

    The latest API results seem to indicate that Sonnet is 200k, while Opus is only 144k.

  20. SadE54 commented on Mar 23, 2026

    @SadE54

    With 1.3 it seems I got a ~140K for Claude models , still not the 200k 🤔

    The latest API results seem to indicate that Sonnet is 200k, while Opus is only 144k.

    Yeah , I checked with Sonnet , and got the same. it's kind a progress 😅

  21. tlerbao commented on Mar 23, 2026

    @tlerbao
    Author

    With 1.3 it seems I got a ~140K for Claude models , still not the 200k 🤔

    The latest API results seem to indicate that Sonnet is 200k, while Opus is only 144k.

    Yeah , I checked with Sonnet , and got the same. it's kind a progress 😅

    But it seems everyone prefers using opus more, haha.

  22. d4rky-pl commented on Mar 23, 2026

    @d4rky-pl

    The API results are weird compared to what vscode displays:

     "family": "claude-opus-4.6",
      "limits": {
        "max_context_window_tokens": 144000,
        "max_non_streaming_output_tokens": 16000,
        "max_output_tokens": 64000,
        "max_prompt_tokens": 128000,
    "family": "claude-sonnet-4.6",
    "limits": {
      "max_context_window_tokens": 200000,
      "max_non_streaming_output_tokens": 16000,
      "max_output_tokens": 32000,
      "max_prompt_tokens": 128000,

    vs

    Image
  23. tlerbao commented on Mar 23, 2026

    @tlerbao
    Author

    @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?

  24. d4rky-pl commented on Mar 23, 2026

    @d4rky-pl

    @tlerbao individual Pro+

    Here's the API results for business Pro:

     "family": "claude-opus-4.6",
      "limits": {
        "max_context_window_tokens": 200000,
        "max_non_streaming_output_tokens": 16000,
        "max_output_tokens": 32000,
        "max_prompt_tokens": 168000,
      "family": "claude-sonnet-4.6",
      "limits": {
        "max_context_window_tokens": 200000,
        "max_non_streaming_output_tokens": 16000,
        "max_output_tokens": 32000,
        "max_prompt_tokens": 168000,

    FYI @rekram1-node ^

    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)

  25. enterlet commented on Mar 26, 2026

    @enterlet

    @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.

  26. krasen1234 commented on Mar 27, 2026

    @krasen1234

    Im confused but is there a fix implemented already for this?

  27. jensenojs commented on Mar 28, 2026

    @jensenojs
    Contributor
  28. removed
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  29. rekram1-node commented on May 13, 2026

    @rekram1-node
    Contributor

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions