Allow configuring a separate (cheaper) model for context compaction (/compact)
@roblourens is already working on this.
Since Jun 8, 2026.
Assessment
This issue has not been assessed yet.
Description
Feature Request
When a chat conversation gets long, VS Code auto-compacts (summarizes) older messages to free up context window space. Users can also trigger this manually with /compact.
Problem: compaction currently uses the same model as the active chat session. So if you're on Claude Opus 4.8 or GPT-5.5, every /compact call burns through premium tokens at the same rate as a full chat response - even though summarization is a much simpler task.
This just feels like a waste. Compaction doesn't need to reason about code or generate complex logic - it's basically "condense this conversation." A lightweight model should handle it just fine.
Suggested Solution
Let users configure a separate model for compaction. Other participants already have something like this - e.g. chat.planAgent.defaultModel lets you pick a model from a dropdown. Compaction should get the same treatment.
Something like:
"github.copilot.chat.compactModel": "GPT-5 mini (copilot)"
Same pattern, just for compaction. Defaults to the chat model if not set, but lets you pick something cheaper if you want.
This would:
- Save credits/tokens for people on premium models
- Use faster, cheaper models for a task that doesn't need much brainpower
- Let power users stretch their monthly Copilot budget further
Alternative Approaches
- Auto-select cheapest - VS Code could just pick the cheapest available model from the same provider for compaction, no config needed.
- Fixed lightweight default - Always use something like GPT-5 mini or Claude Haiku for compaction, with an option to override if someone wants to.
Prior Art
Other tools already have similar requests:
- Claude Code CLI - Feature request for
compactModelsetting (anthropics/claude-code#12660) - Codex CLI - Request for separate compaction model (openai/codex#13739)
- OpenClaude (VS Code extension) -
compactModelconfig option request (Gitlawb/openclaude#1445)
VS Code already supports per-task model configuration in some places (title generation, intent detection, etc.), so compaction seems like a natural fit.
Additional Context
The old vscode-copilot-chat repo (merged into main VS Code now) had this in PR #1846:
Model selection: Always uses GPT-4.1 or the original request's endpoint, even for Simple mode.
So yeah - it's confirmed that compaction has zero model selection logic today. It just inherits whatever you picked for chat, which is exactly the issue.
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.9k
- PR merge metrics
- PR metrics pending
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/vscode
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
new release
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
All issues in microsoft/vscode
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·