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 <noreply@anthropic.com>
This commit is contained in:
@@ -121,8 +121,10 @@ async def generate_project_summary(user_id: int, project_id: int) -> None:
|
||||
|
||||
from fabledassistant.services.llm import generate_completion
|
||||
from fabledassistant.config import Config
|
||||
from fabledassistant.services.settings import get_setting
|
||||
messages = [{"role": "user", "content": prompt}]
|
||||
summary = await generate_completion(messages, model=Config.OLLAMA_BACKGROUND_MODEL, max_tokens=400)
|
||||
bg_model = await get_setting(user_id, "background_model", Config.OLLAMA_BACKGROUND_MODEL)
|
||||
summary = await generate_completion(messages, model=bg_model, max_tokens=400)
|
||||
if not summary:
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user