Skip to content

Show context window size (tokens) in /model command alongside premium request multiplier #1851

Description

@svg153

Describe the feature or problem you'd like to solve

The /model command shows the premium request multiplier for each model but not the context window size (max tokens). There is no way to know, from within the CLI, how many tokens a model actually supports in Copilot.

Proposed solution

Add the context window size (in tokens) to the output of /model, alongside the existing premium request multiplier.

Current /model output:

  claude-sonnet-4.6      ×1  (default)
  claude-opus-4.6        ×3

Proposed /model output:

  claude-sonnet-4.6      ×1    160k ctx  (default)
  claude-opus-4.6        ×3    160k ctx

The context window values should reflect what Copilot actually makes available (i.e. the max_prompt_tokens configured in its routing layer), not just the provider's theoretical max. This distinction matters because the effective context window Copilot exposes may differ from the provider's advertised limits — and today users have no visibility into this.

Example prompts or workflows

  1. Choosing between models for a long session: A developer about to start a large refactor touching 30+ files runs /model to pick the model with the largest effective context window, not just the cheapest in premium requests.

  2. Debugging degraded responses: A user notices the model is repeating tool calls and re-reading already-processed files. Knowing they're at 160k/200k tokens (vs just "78%") helps correlate the degradation with the known "lost in the middle" effect at high context fill.

  3. Cross-client comparison: A user switching between VSCode Copilot, Copilot CLI, and Claude Code wants to know if they get the same effective context window across clients. Today this is completely opaque.

Additional context

  • The data is likely already available in the API response from api.githubcopilot.com/models (the capabilities.limits field), so this should be low-effort to surface.
  • Related issues: #1688 and #1761 both request configurable compaction thresholds — knowing the absolute context window size would make those features even more useful.

Activity

  1. added theissue type on Mar 5, 2026
  2. shantanugoel commented on Mar 6, 2026

    @shantanugoel

    You can see it with /context They seem to have increased the input context size by 32k for opus 4.6/gpt 5.4 probably this week.

    Image
  3. added
    area:context-memoryContext window, memory, compaction, checkpoints, and instruction loading
    on Apr 6, 2026
  4. added
    area:modelsModel selection, availability, switching, rate limits, and model-specific behavior
    on Apr 6, 2026
  5. SuperJMN commented on Apr 28, 2026

    @SuperJMN

    This would be really helpful. Right now I'm basically guessing which model gives me more room to work with. The fact that the effective context Copilot exposes can be drastically different from the provider's native limit (especially for Opus) is not obvious at all — I only realized it after running into repeated auto-compactions. Showing the actual usable context in /model would save a lot of confusion.

  6. copilot-cli-bot commented on Nov 22, 2026

    @copilot-cli-bot

    This appears to be resolved as of GitHub Copilot CLI v1.0.114. Please update to that release or a newer stable version. We're closing this as completed. If it still happens, please comment with your version and reproduction steps.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:context-memoryContext window, memory, compaction, checkpoints, and instruction loadingarea:modelsModel selection, availability, switching, rate limits, and model-specific behavior

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions