Skip to content

Commit 06ed502

Browse files
barckcodeclaude
andcommitted
fix: pull default Ollama model when leader uses inherit
When the leader's SubAgentModel is "inherit", the deploy skipped the Ollama model pull but OPENCODE_MODEL was set to the default model (e.g. qwen3:4b). This caused "model not found" errors at runtime. Now falls back to defaultOpenCodeModel() for the pull step. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 68d80f7 commit 06ed502

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.4.8
1+
0.4.9

internal/api/handlers_teams.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,15 +372,19 @@ func (s *Server) deployTeamAsync(team models.Team) {
372372
return
373373
}
374374

375-
// Determine model to pull from leader's SubAgentModel (strip "ollama/" prefix).
375+
// Determine model to pull: use leader's explicit model, or fall back
376+
// to the default model for the Ollama provider.
376377
ollamaModel := ""
377378
for _, a := range team.Agents {
378379
if a.Role == models.AgentRoleLeader {
379380
ollamaModel = a.SubAgentModel
380381
break
381382
}
382383
}
383-
if ollamaModel != "" && ollamaModel != "inherit" {
384+
if ollamaModel == "" || ollamaModel == "inherit" {
385+
ollamaModel = defaultOpenCodeModel(team.ModelProvider)
386+
}
387+
if ollamaModel != "" {
384388
ollamaModel = strings.TrimPrefix(ollamaModel, "ollama/")
385389
s.db.Model(&team).Update("status_message", "Pulling Ollama model: "+ollamaModel+"...")
386390

0 commit comments

Comments
 (0)