feat(compact): override compact default model and prompt #1636

Closed
opened 2026-02-16 17:31:51 -05:00 by yindo · 4 comments
Owner

Originally created by @spoons-and-mirrors on GitHub (Sep 6, 2025).

Originally assigned to: @thdxr on GitHub.

Summary

I'd like to be able to select the /compact model and override the default compact prompt,

Path

I would gladly PR this, but I am unsure about how to go about it. Should this be done through a reserved:

  • .opencode/agent/compact.md
  • .opencode/command/compact.md
  • .opencode/opencode/compact.md

Or should this be done differently all together? What path to take to implement this?
@thdxr @adamdotdevin

Originally created by @spoons-and-mirrors on GitHub (Sep 6, 2025). Originally assigned to: @thdxr on GitHub. ## Summary I'd like to be able to select the /compact model and override the default compact prompt, ## Path I would gladly PR this, but I am unsure about how to go about it. Should this be done through a `reserved`: - `.opencode/agent/compact.md` - `.opencode/command/compact.md` - `.opencode/opencode/compact.md` Or should this be done differently all together? What path to take to implement this? @thdxr @adamdotdevin
yindo closed this issue 2026-02-16 17:31:51 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Sep 6, 2025):

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

  • #2461: Reports that the 'model' field in slash command YAML frontmatter is being ignored, which is very similar to overriding the compact model
  • #2335: Reports that chosen models are not used for commands, relating to the broader issue of model selection for specific commands/functions

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Sep 6, 2025): This issue might be a duplicate of existing issues. Please check: - #2461: Reports that the 'model' field in slash command YAML frontmatter is being ignored, which is very similar to overriding the compact model - #2335: Reports that chosen models are not used for commands, relating to the broader issue of model selection for specific commands/functions Feel free to ignore if none of these address your specific case.
Author
Owner

@matfax commented on GitHub (Sep 18, 2025):

I would suggest using the existing agent definitions for this, which already provide the necessary logic for the definition of custom models and prompts. There needs to be an additional mode besides the primary and subagent modes. Let's assume it will be called "support" mode. This would enable the definition of three additional support agents: edit, compact, and apply.

@matfax commented on GitHub (Sep 18, 2025): I would suggest using the existing agent definitions for this, which already provide the necessary logic for the definition of custom models and prompts. There needs to be an additional mode besides the primary and subagent modes. Let's assume it will be called "support" mode. This would enable the definition of three additional support agents: edit, compact, and apply.
Author
Owner

@anuramat commented on GitHub (Sep 19, 2025):

Title generator/small_model should probably be moved to "support agents" as well then?

@anuramat commented on GitHub (Sep 19, 2025): Title generator/`small_model` should probably be moved to "support agents" as well then?
Author
Owner

@rekram1-node commented on GitHub (Dec 27, 2025):

[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

@rekram1-node commented on GitHub (Dec 27, 2025): [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1636