From 2709220b84530944944954aa1205288302065333 Mon Sep 17 00:00:00 2001 From: ErixM <39563793+ErixM@users.noreply.github.com> Date: Tue, 18 Nov 2025 14:49:03 +0100 Subject: [PATCH] fix the tts model dropdown to show the currently selected model (#7306) * fix the tts model dropdown to show the currently selected model * Update core/config/model_config.go Signed-off-by: Ettore Di Giacinto --------- Signed-off-by: Ettore Di Giacinto Co-authored-by: Erixhens Muka Co-authored-by: Ettore Di Giacinto --- core/config/model_config.go | 5 +++-- core/http/views/tts.html | 9 ++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/config/model_config.go b/core/config/model_config.go index e7b4567c1..50ac44625 100644 --- a/core/config/model_config.go +++ b/core/config/model_config.go @@ -534,7 +534,8 @@ const ( func GetAllModelConfigUsecases() map[string]ModelConfigUsecases { return map[string]ModelConfigUsecases{ - "FLAG_ANY": FLAG_ANY, + // Note: FLAG_ANY is intentionally excluded from this map + // because it's 0 and would always match in HasUsecases checks "FLAG_CHAT": FLAG_CHAT, "FLAG_COMPLETION": FLAG_COMPLETION, "FLAG_EDIT": FLAG_EDIT, @@ -636,7 +637,7 @@ func (c *ModelConfig) GuessUsecases(u ModelConfigUsecases) bool { } } if (u & FLAG_TTS) == FLAG_TTS { - ttsBackends := []string{"bark-cpp", "piper", "transformers-musicgen"} + ttsBackends := []string{"bark-cpp", "piper", "transformers-musicgen", "kokoro"} if !slices.Contains(ttsBackends, c.Backend) { return false } diff --git a/core/http/views/tts.html b/core/http/views/tts.html index e16e7e551..9132b7413 100644 --- a/core/http/views/tts.html +++ b/core/http/views/tts.html @@ -34,15 +34,14 @@
-
+
-