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)
compaction config only supports: mode, reserveTokensFloor, maxHistoryShare, memoryFlush
- There is no
compaction.model option
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
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
compactionconfig only supports:mode,reserveTokensFloor,maxHistoryShare,memoryFlushcompaction.modeloptionDesired 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
Notes
Environment