From 3bd0dc6879deda47e82f4804311a11ec8d29f62d Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Fri, 3 Apr 2026 10:44:08 -0400 Subject: [PATCH] feat(settings): add background model picker with KV cache performance warning Exposes OLLAMA_BACKGROUND_MODEL as a per-user setting in General settings, alongside the Chat Model selector. Includes an inline warning when the same model is selected for both, explaining the KV cache performance impact. All background task callers (title generation, tag suggestions, project summaries, RSS classification) now read background_model from user settings, falling back to OLLAMA_BACKGROUND_MODEL env var. Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/views/SettingsView.vue | 22 +++++++++++++++++++ src/fabledassistant/services/chat.py | 4 +++- .../services/generation_task.py | 8 ++++--- src/fabledassistant/services/projects.py | 4 +++- .../services/rss_classifier.py | 2 +- .../services/tag_suggestions.py | 3 ++- 6 files changed, 36 insertions(+), 7 deletions(-) diff --git a/frontend/src/views/SettingsView.vue b/frontend/src/views/SettingsView.vue index dd1b408..32a2722 100644 --- a/frontend/src/views/SettingsView.vue +++ b/frontend/src/views/SettingsView.vue @@ -15,6 +15,7 @@ const toastStore = useToastStore(); const pushStore = usePushStore(); const assistantName = ref(""); const defaultModel = ref(""); +const backgroundModel = ref(""); const installedModels = ref([]); const defaultChatModel = ref(""); @@ -708,6 +709,7 @@ onMounted(async () => { // Load notification preferences from user settings const allSettings = await apiGet>("/api/settings"); defaultModel.value = allSettings.default_model ?? ""; + backgroundModel.value = allSettings.background_model ?? ""; chatRetentionDays.value = allSettings.chat_retention_days !== undefined ? Number(allSettings.chat_retention_days) : 90; @@ -929,6 +931,7 @@ async function saveAssistant() { await store.updateSettings({ assistant_name: assistantName.value.trim() || "Fable", default_model: defaultModel.value, + background_model: backgroundModel.value, }); saved.value = true; setTimeout(() => (saved.value = false), 2000); @@ -1437,6 +1440,20 @@ function formatUserDate(iso: string): string {

Model used for new conversations.

+
+ + +

+ Model used for background tasks: title generation, tag suggestions, project summaries, and RSS classification. + Using a small dedicated model (e.g. qwen2.5:0.5b) keeps the chat model's KV cache warm between messages, significantly reducing response time. + + ⚠ Setting this to the same model as Chat Model will wipe the KV cache after every background task, increasing response latency. + +

+