-
-
Notifications
You must be signed in to change notification settings - Fork 1
opencode models
Documentation Authority: SYSTEM_MODEL.md Section 1 (Tech Stack)
OpenCode lets you switch between configured AI models directly in your development environment. This guide covers the current repo-level configuration points and the safest generic model-selection patterns.
- SYSTEM_MODEL.md - Primary authority for AI/Agent integration patterns
- AGENTS.md - Implementation patterns and Context7 references
The easiest way to switch models is through the OpenCode interface:
- Sidebar Header: Click the active model name shown in the OpenCode sidebar header to open the available model list.
- Agent Manager: Switch to the Agent Manager view (usually via the gear icon or a specific tab) to see a comprehensive list of models and their capabilities.
You can interact with model settings using the OpenCode Terminal User Interface (TUI):
-
List Models: Type
/modelsin the OpenCode terminal to inspect currently available models. -
Connect Providers: Type
/connectif your local OpenCode install supports interactive provider setup. -
Select Model: Use
/model <model-id>to switch directly to a specific model.
Boost your efficiency with these shortcuts:
-
Switch Model:
Ctrl + O(Linux/Windows) orCmd + O(Mac) opens the interactive model selection menu. -
New Session:
Ctrl + Shift + Esc(Linux/Windows) orCmd + Shift + Esc(Mac) starts a fresh session, allowing you to pick a model from the start.
For advanced users, you can set your default model in the runtime configuration file:
-
Locate your
opencode.jsonfile (the repo documents~/.config/opencode/opencode.jsonas the standard runtime path). -
Set the
"model"key:{ "model": "openai/gpt-5.4" } -
Replace the example with any provider/model ID exposed by your configured runtime.
-
OpenCode will prioritize this setting on startup.
- Repo MCP topology lives in
mcp.json. - Runtime client configuration lives in
~/.config/opencode/opencode.json. - Use
opencode mcp listto verify that the repo's documented MCP servers are connected before troubleshooting model or tool availability.
Tip
Prefer your team's default high-context reasoning model for cross-repo refactors, and switch to lighter/cheaper models only for narrow follow-up edits.