Copilot inputs cause a credits explosion #197844
Replies: 3 comments 1 reply
-
|
The high token usage is usually caused by how Copilot constructs the context sent to the model, not just by the 10 lines you changed. When you ask Copilot to modify code, it may include: The entire file being edited As a result, a seemingly small change can generate a very large prompt. If the workspace contains large files or extensive context, the model may receive millions of input tokens even though the actual code modification is only a few lines. In your example, 2.95M input tokens for a 10-line change suggests that a substantial amount of repository and conversation context was included in the request. Since billing is primarily based on input and output tokens, the majority of the credit consumption comes from the input side rather than the generated response. It would be helpful if GitHub provided: A detailed token breakdown per request. Greater transparency would make it much easier for users to understand and manage their credit usage when working with Copilot and large codebases. |
Beta Was this translation helpful? Give feedback.
-
|
2.95M input tokens for a 10-line change doesn't seem right. If that's accurate, there should be more transparency around what's actually being sent to the model. Is Copilot including the entire repository, previous chat history, or additional context behind the scenes? A token usage breakdown would make it much easier to understand why credits are being consumed so quickly. |
Beta Was this translation helpful? Give feedback.
-
Root CauseCopilot does not only send the 10 lines you edited.It constructs a large context window that may include:- Entire file contents- Related files and dependencies- Other open editor tabs- Workspace metadata- Previous chat history and instructionsWhy Credits SpikeBilling is based on input + output tokens.Even small edits can trigger millions of input tokensif the workspace or repository is large.Example: 2.95M input tokens → ~900 credits consumed.What Can Help1. Request transparency:- Token breakdown per request- Visibility into which files/context are included2. Limit context:- Option to restrict Copilot to current file only- Controls to exclude unrelated tabs/dependencies3. Add safeguards:- Warnings before unusually large prompts- Ability to cap token usage per requestPractical Steps- Monitor usage in billing dashboard- Keep fewer files/tabs open when prompting Copilot- Re‑authenticate if usage looks abnormal- Raise a support ticket for manual review if credits drain too fast |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
🏷️ Discussion Type
Question
Body
Copilot inputs cause a credits explosion. You'll discover this issue when customizing the official Deepseek model using Copilot. Let's test this with a small scenario. Modify 10 lines of code and observe usage information from Deepseek model vendors: 2.95 million tokens input, 6003 tokens output. This explains why the credit limit is consumed so quickly. Looking at billing, using Claude 4.6 Sonnet as an example, every million tokens earns 300 credits, meaning this input consumes nearly 900 credits. So why are Copilot's inputs so high?
Beta Was this translation helpful? Give feedback.
All reactions