[FEATURE]: Ability to specify different model to use for compaction #4246

Closed
opened 2026-02-16 17:43:09 -05:00 by yindo · 3 comments
Owner

Originally created by @mzealey on GitHub (Jan 5, 2026).

Originally assigned to: @thdxr on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

It would be nice to be able to use a lightweight model (eg flash / haiku) to handle context compression rather than the slower and more capable model that is currently running. Perhaps either as a config option or as a different agent like 'Compactor' which could then have a default model associated with it?

Originally created by @mzealey on GitHub (Jan 5, 2026). Originally assigned to: @thdxr on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request It would be nice to be able to use a lightweight model (eg flash / haiku) to handle context compression rather than the slower and more capable model that is currently running. Perhaps either as a config option or as a different agent like 'Compactor' which could then have a default model associated with it?
yindo added the discussionzen labels 2026-02-16 17:43:09 -05:00
yindo closed this issue 2026-02-16 17:43:09 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 5, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #6651: [FEATURE]: Dynamic model selection for subagents via Task tool - discusses model selection for subagents with detailed proposals for tiered model selection
  • #6928: Subtask commands do not inherit model - relates to model inheritance in subtasks

These issues address similar use cases around flexible model selection for different agent tasks. You may want to reference them or consolidate the discussion.

@github-actions[bot] commented on GitHub (Jan 5, 2026): This issue might be a duplicate of existing issues. Please check: - #6651: [FEATURE]: Dynamic model selection for subagents via Task tool - discusses model selection for subagents with detailed proposals for tiered model selection - #6928: Subtask commands do not inherit model - relates to model inheritance in subtasks These issues address similar use cases around flexible model selection for different agent tasks. You may want to reference them or consolidate the discussion.
Author
Owner

@rekram1-node commented on GitHub (Jan 5, 2026):

@mzealey you can do this in ur opencode config:

 "agent": {
    "compaction": {
      "model": "...",
    },
  },
@rekram1-node commented on GitHub (Jan 5, 2026): @mzealey you can do this in ur opencode config: ``` "agent": { "compaction": { "model": "...", }, }, ```
Author
Owner

@mzealey commented on GitHub (Jan 5, 2026):

Ah I see - I looked in the docs which did not have this - i see it's in the config.json though.

@mzealey commented on GitHub (Jan 5, 2026): Ah I see - I looked in the [docs](https://opencode.ai/docs/config/#compaction) which did not have this - i see it's in the config.json though.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4246