-
-
Notifications
You must be signed in to change notification settings - Fork 69.5k
Feature: Allow compaction model override (use cheaper model for summarization) #7926
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
Compaction (conversation summarization) always uses the session's current model. When running an expensive model like Opus for conversation quality, the compaction step also runs on Opus — which is overkill for summarization and significantly increases cost.
Current Behavior
- Compaction model = session model (no override possible)
compactionconfig only supports:mode,reserveTokensFloor,maxHistoryShare,memoryFlush- There is no
compaction.modeloption
Desired Behavior
Allow specifying a separate model for compaction:
{
"compaction": {
"model": "anthropic/claude-sonnet-4",
"mode": "safeguard"
}
}This would let users run their primary conversation on a high-quality model while using a cheaper model for the mechanical task of summarizing conversation history.
Use Case
- Primary model: Opus ($15/M input, $75/M output) — for conversation quality
- Compaction model: Sonnet ($3/M input, $15/M output) — 5x cheaper, sufficient for summarization
- Or even use a non-Anthropic model (Gemini, etc.) for compaction to avoid metered API costs entirely
Notes
- Summarization is a well-defined, lower-complexity task that doesn't require top-tier reasoning
- The compaction prompt is structured (system-generated), so model compatibility should be straightforward
- This would be especially valuable for users on metered API plans with weekly/monthly budgets
Environment
- OpenClaw version: 2026.2.1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Fields
Give feedbackNo fields configured for issues without a type.