Skip to content

Feature request: compaction.model override #15826

Description

@kavinbmittal

Summary

Allow configuring a separate model for conversation compaction via agents.defaults.compaction.model (and per-agent overrides).

Motivation

Compaction currently uses the session's primary model. For users running an expensive primary model (e.g. Claude Opus) for conversation quality, compaction is a mechanical summarization task that doesn't need the same level of intelligence. Being able to route compaction to a cheaper model (e.g. Sonnet) would meaningfully reduce costs without affecting conversation quality.

Proposed Config

{
  "agents": {
    "defaults": {
      "compaction": {
        "mode": "safeguard",
        "model": "anthropic/claude-sonnet-4",
        "memoryFlush": {
          "enabled": true,
          "softThresholdTokens": 40000
        }
      }
    }
  }
}

Same pattern as heartbeat.model and subagents.model — override the model for a specific subsystem without changing the primary.

Current Workaround

None. Compaction always uses the primary model.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions