Pre-flight Checklist
📝 Bug Description
When SDD phase models are configured directly in opencode.json (e.g., by an AI agent setting agent.sdd-explore.model, agent.sdd-propose.model, etc.), the gga TUI "Configure OpenCode Models" screen does not reflect those assignments — all phases show [default].
OpenCode itself correctly picks up and uses the configured models at runtime for each SDD phase, confirming the config entries are valid.
What I did: I asked DeepSeek V4 Pro (via OpenCode) to choose the best cost/benefit models for each SDD phase and write them into my OpenCode config. It configured them in opencode.json under the agent map. I verified that each SDD phase (init, explore, propose, spec, design, tasks, apply, verify, archive, onboard) uses the right model at runtime.
What gga shows: Opening gga → "Configure OpenCode Models" shows every phase as [default], as if the config entries don't exist.
🔄 Steps to Reproduce
- Configure SDD phase models directly in
opencode.json (not through gga TUI). For example:
{
"agent": {
"sdd-explore": { "model": "deepseek/deepseek-v4-pro" },
"sdd-apply": { "model": "deepseek/deepseek-v4-pro" }
}
}
- Run
gga
- Go to "Configure Models" → "Configure OpenCode Models"
- Observe the phase assignments
✅ Expected Behavior
The "Configure OpenCode Models" screen should load the model assignments from opencode.json (agent.<phase>.model) and display the actual configured provider/model for each phase, matching what OpenCode uses at runtime.
❌ Actual Behavior
All SDD phases show [default]. The models configured in opencode.json are not reflected.
Gentle AI Version
- gentle-ai: 2.3.0
- gga: 2.10.1
Operating System
Linux
AI Agent / Client
OpenCode
📋 Affected Area
TUI (terminal UI)
Additional Context
Looking at the code path:
ReadCurrentModelAssignments() (internal/components/sdd/read_assignments.go:44) reads from opencode.DefaultSettingsPath() which resolves to ~/.config/opencode/opencode.json
- It extracts
agent.<phase>.model for phases in configurableAgentSet
- This is called at
internal/tui/model.go:2005-2007 when entering the Configure OpenCode Models screen, guarded by if m.Selection.ModelAssignments == nil
The user confirmed they use opencode.json (not .jsonc), so the file path should be correct. If the models are in agent.<phase>.model format with a provider/model separator (/ or :), ReadCurrentModelAssignments should pick them up.
Related but distinct issues: #771 (custom providers in .jsonc), #950 (wrong profile loaded by model screen).
Pre-flight Checklist
status:approved📝 Bug Description
When SDD phase models are configured directly in
opencode.json(e.g., by an AI agent settingagent.sdd-explore.model,agent.sdd-propose.model, etc.), theggaTUI "Configure OpenCode Models" screen does not reflect those assignments — all phases show[default].OpenCode itself correctly picks up and uses the configured models at runtime for each SDD phase, confirming the config entries are valid.
What I did: I asked DeepSeek V4 Pro (via OpenCode) to choose the best cost/benefit models for each SDD phase and write them into my OpenCode config. It configured them in
opencode.jsonunder theagentmap. I verified that each SDD phase (init, explore, propose, spec, design, tasks, apply, verify, archive, onboard) uses the right model at runtime.What
ggashows: Openinggga→ "Configure OpenCode Models" shows every phase as[default], as if the config entries don't exist.🔄 Steps to Reproduce
opencode.json(not throughggaTUI). For example:{ "agent": { "sdd-explore": { "model": "deepseek/deepseek-v4-pro" }, "sdd-apply": { "model": "deepseek/deepseek-v4-pro" } } }gga✅ Expected Behavior
The "Configure OpenCode Models" screen should load the model assignments from
opencode.json(agent.<phase>.model) and display the actual configured provider/model for each phase, matching what OpenCode uses at runtime.❌ Actual Behavior
All SDD phases show
[default]. The models configured inopencode.jsonare not reflected.Gentle AI Version
Operating System
Linux
AI Agent / Client
OpenCode
📋 Affected Area
TUI (terminal UI)
Additional Context
Looking at the code path:
ReadCurrentModelAssignments()(internal/components/sdd/read_assignments.go:44) reads fromopencode.DefaultSettingsPath()which resolves to~/.config/opencode/opencode.jsonagent.<phase>.modelfor phases inconfigurableAgentSetinternal/tui/model.go:2005-2007when entering the Configure OpenCode Models screen, guarded byif m.Selection.ModelAssignments == nilThe user confirmed they use
opencode.json(not.jsonc), so the file path should be correct. If the models are inagent.<phase>.modelformat with a provider/model separator (/or:),ReadCurrentModelAssignmentsshould pick them up.Related but distinct issues: #771 (custom providers in
.jsonc), #950 (wrong profile loaded by model screen).