Why can't we fully utilize context_window? (Data from Copilot's own API) #186340
Replies: 4 comments 12 replies
-
Evidence: Raw API ResponseHere's how to reproduce this data using # 1. Get your Copilot token (requires authentication)
TOKEN="<YOUR_COPILOT_TOKEN>"
# 2. Call the official API
curl -s "https://api.githubcopilot.com/models" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-H "Copilot-Integration-Id: vscode-chat" \
-H "Editor-Version: vscode/1.96.0" \
-H "Editor-Plugin-Version: copilot-chat/0.35.0" \
-H "User-Agent: GitHubCopilotChat/0.35.0" \
-H "X-GitHub-Api-Version: 2025-10-01"Key Model Limits (from API response on 2026-02-04)
Utilization = (max_prompt + max_output) / context_window Raw JSON Sample (gpt-5.1-codex-max){
"id": "gpt-5.1-codex-max",
"name": "GPT-5.1-Codex-Max",
"capabilities": {
"limits": {
"max_context_window_tokens": 400000,
"max_output_tokens": 128000,
"max_prompt_tokens": 128000
}
}
}This confirms that while |
Beta Was this translation helpful? Give feedback.
-
|
max_prompt doesn't seem to calculate the full input, possibly excluding thinking. Previously, when using the claude sonnet model via chat completions, I've used over 200K of context. They probably have their own internal implementation; with gpt-5.2, I often use over 200K. You'll notice it once you turn off automatic compaction. @cuipengfei |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
What's the rationale behind this, Github? Seems like a very, very stupid limitation. |
Beta Was this translation helpful? Give feedback.






Uh oh!
There was an error while loading. Please reload this page.
-
Why can't we fully utilize context_window? (Data from Copilot's own API)
TL;DR
The Copilot API returns large
context_windowvalues (e.g., 400K tokens), but the actual usable capacity is limited bymax_promptwhich is often much smaller (e.g., 128K). This means users cannot fully utilize the reported context window.Data Source
This data comes directly from GitHub Copilot's own API:
The response includes three key fields for each model:
limits.context_window— Reported total context capacitylimits.max_prompt— Actual maximum input tokens allowedlimits.max_output— Maximum output tokens per responseThe Problem: Utilization Rate
Utilization = (max_prompt + max_output) / context_window
Key Observations
gpt-5.1-codex-max has "max" in its name but only has 64% utilization — the same as regular gpt-5.1-codex
gpt-5.2-codex is the only GPT-5 series model that can fully utilize its 400K context window
Users hitting
prompt token count exceeds the limit of 128000errors are confused because they see 400K context_window in the API responseQuestions for GitHub
Why is there such a large gap between
context_windowandmax_promptfor most models?Is this a deliberate limitation imposed by GitHub Copilot, or inherited from the underlying models?
Will this be improved? Many users are hitting the 128K limit and don't understand why they can't use the full 400K.
Can you document this clearly? Currently there's no official documentation explaining these three limits and their relationship.
Related Issues
Environment
https://api.githubcopilot.com/modelsBeta Was this translation helpful? Give feedback.
All reactions