Models
OpenCode integrates with 75+ LLM providers through the AI SDK and Models.dev.
Selecting a Model
Use the /models command in the interface.
Recommended Models
- GPT 5.2
- GPT 5.1 Codex
- Claude Opus 4.5
- Claude Sonnet 4.5
- Minimax M2.1
- Gemini 3 Pro
Setting Default Model
{
"model": "lmstudio/google/gemma-3n-e4b"
}Format: provider_id/model_id
Global Model Configuration
{
"provider": {
"openai": {
"models": {
"gpt-5": {
"options": {
"reasoningEffort": "high"
}
}
}
}
}
}Variants
Built-in Variants
- Anthropic:
high(default),max - OpenAI:
none,minimal,low,medium,high,xhigh - Google:
low,high
Custom Variants
{
"provider": {
"openai": {
"models": {
"gpt-5": {
"variants": {
"thinking": {
"reasoningEffort": "high"
}
}
}
}
}
}
}Model Loading Priority
- Command-line flag (
--model) - Config file
modelsetting - Last used model
- First model by priority