Answer: By default OpenCode writes the summary itself using the session's model; you can change it by setting agents.compaction.model to another model in opencode.jsonc, for example "anthropic/claude-sonnet-5-5". If that model cannot be resolved, OpenCode falls back to the session's model. Status: Confirmed Entry: tool/opencode/models/compaction-model Revision: 2 Digest: sha256:1158c74f3602e00e (changes whenever the content changes) Timeline: Created: 2026-11-13T03:56:36Z Last changed: 2026-11-17T14:11:47Z (Fallback behavior: — → the session’s model) Last verified: 2026-11-20T13:45:36Z Next check: 2026-11-21T13:45:36Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Default model | the session’s model | [1] | 2026-11-20 Setting to change model | agents.compaction.model | [1] | 2026-11-20 Example model | anthropic/claude-sonnet-5-5 | [1] | 2026-11-20 Fallback behavior | the session’s model | [1] | 2026-11-20 Sources: [1] opencode. "Compaction | OpenCode". https://opencode.ai/docs/compaction/ Role: primary. Accessed: 2026-11-20T13:45:36Z Quote: "By default OpenCode writes the summary itself, using the session’s model." (Supports: Default model) Quote: "Set agents.compaction.model to use another model for summaries" (Supports: Setting to change model) Quote: ""model" : "anthropic/claude-sonnet-5-5"" (Supports: Example model) Quote: "If that model cannot be resolved, OpenCode falls back to the session’s model." (Supports: Fallback behavior) Snapshot SHA-256: d245d3913694ae5b9552728fe64aa35b9b6a51b4fe3b34c67b4f94f792d2f767 (captured 2026-11-17T14:11:45Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-17T14:11:47Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:45:36Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:45:36Z Last attempt: 2026-11-20T13:45:36Z Notes and limitations: Extracted automatically from a single official source (section "Model"). Related: https://latestn.com/tool/opencode/models/console-vs-inference-model-lists What is the difference between the opencode Console model list API and the inference model list APIs? https://latestn.com/tool/opencode/models/enable-restricted-models How do I enable restricted models in OpenCode Go? https://latestn.com/tool/opencode/models/local-models How do I use local models with Ollama, LM Studio, or vLLM in opencode? https://latestn.com/tool/opencode/memory-and-context/manual-compaction How do I trigger compaction manually in opencode? https://latestn.com/tool/opencode/models/choose-edit-models-pricing How do I choose or edit models and set custom pricing in opencode Console? https://latestn.com/tool/opencode/models/claude-code-supported-models Which models can I use with Claude Code through OpenCode Console? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-17T14:11:47Z | changed | Fallback behavior: — → the session’s model | [1] 2026-11-17T14:11:47Z | changed | Example model: — → anthropic/claude-sonnet-5-5 | [1] 2026-11-17T14:11:47Z | changed | Setting to change model: — → agents.compaction.model | [1] 2026-11-17T14:11:47Z | changed | Default model: — → the session’s model | [1] 2026-11-17T14:11:47Z | changed | fallback behavior: the session’s model → — | [1] 2026-11-17T14:11:47Z | changed | example model: anthropic/claude-sonnet-5-5 → — | [1] 2026-11-17T14:11:47Z | changed | setting to change model: agents.compaction.model → — | [1] 2026-11-17T14:11:47Z | changed | default model: the session’s model → — | [1] 2026-11-13T03:56:36Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/opencode/models/compaction-model/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/opencode/models/compaction-model POST: https://latestn.com/dispute/tool/opencode/models/compaction-model with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/opencode/models/compaction-model?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). Which model does opencode use for compaction and how do I change it? Revision 2, last verified 2026-11-20T13:45:36Z. https://latestn.com/tool/opencode/models/compaction-model (accessed 2026-11-21T09:50:25Z). @misc{LatestN_tool_opencode_models_compaction_model_r2, title = {Which model does opencode use for compaction and how do I change it?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/opencode/models/compaction-model}}, note = {Revision 2; digest sha256:1158c74f3602e00e; last verified 2026-11-20T13:45:36Z; accessed 2026-11-21T09:50:25Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/opencode/models/compaction-model