From 31777ae66be08f110c9605adf7b4759d8e14aa86 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Sat, 28 Feb 2026 21:04:53 -0500 Subject: [PATCH] Apply or Config.OLLAMA_MODEL safety net to assist route The same empty-string model guard added to chat.py was missing from the notes assist route. If default_model was stored as "" in the DB, the assist route would pass "" to Ollama which responds with 400, surfaced to the user as a "400" error in the assist panel. Co-Authored-By: Claude Sonnet 4.6 --- src/fabledassistant/routes/notes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fabledassistant/routes/notes.py b/src/fabledassistant/routes/notes.py index 55413d3..1ad4371 100644 --- a/src/fabledassistant/routes/notes.py +++ b/src/fabledassistant/routes/notes.py @@ -259,7 +259,7 @@ async def assist_route(): if existing and existing.state == GenerationState.RUNNING: return jsonify({"error": "Assist generation already running"}), 409 - model = await get_setting(uid, "default_model", Config.OLLAMA_MODEL) + model = await get_setting(uid, "default_model", Config.OLLAMA_MODEL) or Config.OLLAMA_MODEL messages = build_assist_messages(body, target_section, instruction) buf = create_assist_buffer(uid)