From c8fd01b13267212c3deee032e6b068a7ee3f1a67 Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Fri, 13 Jun 2025 15:15:05 -0300 Subject: [PATCH] fix: fix "failed to generate title: context deadline exceeded" error This only happens on initializing a new project. --- internal/llm/agent/agent.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/llm/agent/agent.go b/internal/llm/agent/agent.go index c19451e1d0ef46597b8e3f9d56f9e0ebdf4362cb..dbf72fe9dbabbbd4bf455bc84a9bb571080b6c63 100644 --- a/internal/llm/agent/agent.go +++ b/internal/llm/agent/agent.go @@ -241,7 +241,7 @@ func (a *agent) processGeneration(ctx context.Context, sessionID, content string logging.ErrorPersist("panic while generating title") }) titleErr := a.generateTitle(context.Background(), sessionID, content) - if titleErr != nil { + if titleErr != nil && !errors.Is(titleErr, context.Canceled) && !errors.Is(titleErr, context.DeadlineExceeded) { logging.ErrorPersist(fmt.Sprintf("failed to generate title: %v", titleErr)) } }()