From 0280d2480f07e9cb3cd2c82e1b715a174704d78e Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Sat, 10 Oct 2026 11:17:37 +1100 Subject: [PATCH] fix(archiegateway): keep the chat model list non-nil when empty --- internal/app/archiegateway/chat_models.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/app/archiegateway/chat_models.go b/internal/app/archiegateway/chat_models.go index 8bdd08dd8..9104b1fb3 100644 --- a/internal/app/archiegateway/chat_models.go +++ b/internal/app/archiegateway/chat_models.go @@ -58,7 +58,10 @@ func mergeModelRefs(configured map[string]string, catalogs ...[]string) []string } } - return slices.Sorted(maps.Keys(unique)) + // Non-nil: the chat snapshot serialises this as [] when no model is configured. + models := slices.AppendSeq(make([]string, 0, len(unique)), maps.Keys(unique)) + slices.Sort(models) + return models } func newChatModelManager(configured map[string]string, catalogs ...[]string) *chatModelManager {