claude-memory/graph/configurations/opencode-agent-model-configuration-33fa68.md

54 lines
1.8 KiB
Markdown

---
id: 33fa68ae-a606-4c4b-b444-356185d62722
type: configuration
title: "OpenCode agent model configuration"
tags: [opencode, configuration, models, agents, ai, homelab]
importance: 0.7
confidence: 0.8
created: "2026-02-02T19:46:30.736258+00:00"
updated: "2026-03-02T20:05:15.491602+00:00"
relations:
- target: 6ce2055a-b51b-45e4-8ff0-d34b385f7552
type: RELATED_TO
direction: incoming
strength: 0.8
edge_id: 4581b5dd-9d0c-496e-a51b-1b0325f62f03
---
Configured default models for OpenCode agents in ~/.config/opencode/opencode.json:
PRIMARY AGENTS:
- plan: anthropic/claude-sonnet-4-5 (for planning and analysis)
- build: opencode/minimax-m2.1-free (for development work)
SUBAGENTS:
- explore: anthropic/claude-haiku-4-5 (fast codebase exploration)
- title: anthropic/claude-haiku-4-5 (session title generation)
- general: anthropic/claude-sonnet-4-5 (general-purpose reasoning)
- compaction: anthropic/claude-sonnet-4-5 (context compaction)
- summary: anthropic/claude-sonnet-4-5 (session summarization)
KEY DECISIONS:
1. Pinned to latest generation models (4.5 series) rather than using -latest tags for older models
2. Haiku 4.5 for lightweight/fast tasks, Sonnet 4.5 for reasoning-heavy tasks
3. No -latest variants exist for Sonnet 4.5 or Minimax M2.1, so used base versions without dates
4. Configuration is global (~/.config/opencode/) and applies to all projects unless overridden
CONFIGURATION FILE STRUCTURE:
{
"$schema": "https://opencode.ai/config.json",
"agent": {
"agent-name": {
"model": "provider/model-id"
}
}
}
PRECEDENCE ORDER (for future reference):
1. Remote config (.well-known/opencode)
2. Global config (~/.config/opencode/opencode.json) ← THIS FILE
3. Custom config (OPENCODE_CONFIG env var)
4. Project config (opencode.json in project root)
5. .opencode directories
6. Inline config (OPENCODE_CONFIG_CONTENT env var)