Allow configuring a separate (cheaper) model for context compaction (/compact)

Open
#320,346 0 comments 7 reactions 1 assignee View on GitHub

@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
  1. Auto-select cheapest - VS Code could just pick the cheapest available model from the same provider for compaction, no config needed.
  2. 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 compactModel setting (anthropics/claude-code#12660)
  • Codex CLI - Request for separate compaction model (openai/codex#13739)
  • OpenClaude (VS Code extension) - compactModel config 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/vscode

All issues in microsoft/vscode

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.