From fe20b2c55bbbd7e3ee82a10f09868e8599fbe10e Mon Sep 17 00:00:00 2001 From: rcourtman Date: Mon, 15 Dec 2025 16:59:51 +0000 Subject: [PATCH] fix(ai): add fallback default model when Ollama model is empty When model is not explicitly set in config or request, fall back to llama3 to prevent 'model is required' errors from Ollama. --- internal/ai/providers/ollama.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/ai/providers/ollama.go b/internal/ai/providers/ollama.go index f758680..34eead3 100644 --- a/internal/ai/providers/ollama.go +++ b/internal/ai/providers/ollama.go @@ -98,6 +98,10 @@ func (c *OllamaClient) Chat(ctx context.Context, req ChatRequest) (*ChatResponse if model == "" { model = c.model } + // Ultimate fallback - if no model configured anywhere, use llama3 + if model == "" { + model = "llama3" + } ollamaReq := ollamaRequest{ Model: model,