13. Providers, Models and Model Selection
13.1 Provider vs model
A provider supplies access to AI models.
A model is the actual model used for inference.
Conceptually:
OpenCode
|
+--> Provider A --> Model A
|
+--> Provider B --> Model B
|
+--> Provider C --> Model C
13.2 Multiple providers
OpenCode's current documentation states that it supports many LLM providers and local models.
Provider availability changes over time.
Use:
/connect
inside OpenCode to connect a provider.
Use the current /models interface and official provider documentation to inspect available models.
13.3 Model IDs
OpenCode configuration uses provider/model-style identifiers in its documented agent configuration.
Example:
provider/model-id
Always copy the exact model identifier exposed by your provider/OpenCode installation.
13.4 Model selection
Think about:
Task
|
+--> Required reasoning
+--> Coding ability
+--> Speed
+--> Cost
+--> Context needs
|
v
Model choice
Example strategy:
| Task | Possible priority |
|---|---|
| Architecture | Reasoning quality |
| Complex debugging | Reasoning + coding |
| Simple documentation | Speed + cost |
| Code review | Reasoning + context |
| Large refactor | Strong coding + context |
This is a task-based framework, not a ranking of providers or models.
13.5 Agent-specific models
OpenCode supports configuring a model for an agent.
Example:
{
"agent": {
"plan": {
"model": "provider/model-id"
},
"review": {
"model": "provider/model-id"
}
}
}
Use the exact configuration schema for your installed OpenCode version.
13.6 Local models
OpenCode documentation also describes support for local models.
Local models can be useful when:
- Data must remain local
- You want to experiment
- You have suitable hardware
- Latency/cost requirements favor local inference
Local models may differ significantly in capability from hosted models.
Exercise
For five tasks in your project, define:
- Task
- Required capability
- Preferred model characteristics
- Why
- Verification method