Answer: Set the model in opencode.json or opencode.jsonc to choose the default for new work, for example by adding a "model" entry such as "anthropic/claude-sonnet-5-5". The configured model becomes the catalog default when it is enabled and its provider is available. Status: Overdue (check was due 2026-11-20T13:37:01Z and has not succeeded) Entry: tool/opencode/models/set-default-model Revision: 1 Digest: sha256:9c4da91019a258ef (changes whenever the content changes) Timeline: Created: 2026-11-13T03:57:50Z Last changed: 2026-11-13T03:57:50Z Last verified: 2026-11-19T13:37:01Z Next check: 2026-11-20T13:37:01Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of config file | opencode.json or opencode.jsonc | [1] | 2026-11-19 example model value | anthropic/claude-sonnet-5-5 | [1] | 2026-11-19 fallback behavior | newest available supported model | [1] | 2026-11-19 session precedence | A model already selected for a session takes precedence over the configured default. | [1] | 2026-11-19 Sources: [1] opencode. "Models | OpenCode". https://opencode.ai/docs/models/ Role: primary. Accessed: 2026-11-19T13:37:01Z Quote: "Set model in opencode.json or opencode.jsonc to choose the default for new work" (Supports: config file) Quote: ""model" : "anthropic/claude-sonnet-5-5"" (Supports: example model value) Quote: "Otherwise, OpenCode falls back to the newest available supported model." (Supports: fallback behavior) Quote: "A model already selected for a session takes precedence over the configured default." (Supports: session precedence) Snapshot SHA-256: 859697d5b1c7d707cd280658aaca6b793bd75b9f3111347dc1e0b865afcf857e (captured 2026-11-13T03:57:50Z) 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-13T03:57:50Z, so the values verified then were kept. Cross-check: not-available at 2026-11-19T13:37:01Z. No independent second source is configured for this entry Last successful check: 2026-11-19T13:37:01Z Last attempt: 2026-11-19T13:37:01Z Notes and limitations: Extracted automatically from a single official source (section "Defaults"). Related: https://latestn.com/tool/opencode/models/switch-models-in-session How do I switch models in a Hermes session with OpenCode? https://latestn.com/tool/opencode/models/use-go-models-with-codex How do I use opencode Go models with Codex? https://latestn.com/tool/opencode/permissions-and-security/authenticate-console-api How do I authenticate requests to the opencode Console API? https://latestn.com/tool/opencode/models/select-model-for-run How do I choose which model opencode uses for a run command? https://latestn.com/tool/opencode/models/select-model-session How do I select a model for the current session in opencode? https://latestn.com/tool/opencode/models/select-models How do I select or list models in Pi with OpenCode? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:57:50Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/opencode/models/set-default-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/set-default-model POST: https://latestn.com/dispute/tool/opencode/models/set-default-model with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/opencode/models/set-default-model?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I set a default model in opencode? Revision 1, last verified 2026-11-19T13:37:01Z. https://latestn.com/tool/opencode/models/set-default-model (accessed 2026-11-21T09:50:29Z). @misc{LatestN_tool_opencode_models_set_default_model_r1, title = {How do I set a default model in opencode?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/opencode/models/set-default-model}}, note = {Revision 1; digest sha256:9c4da91019a258ef; last verified 2026-11-19T13:37:01Z; accessed 2026-11-21T09:50:29Z} } 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/set-default-model