Remove intent model entirely; quick-capture uses primary model

The separate intent model (OLLAMA_INTENT_MODEL / qwen2.5:7b) is removed
from every part of the system. All classification now uses the primary model.

Changes:
- config.py: remove OLLAMA_INTENT_MODEL
- intent.py: remove classify_intent() and all supporting infrastructure
  (_SYSTEM_PROMPT_TEMPLATE, _RESEARCH_PREFIX, _PRIOR_WORK_REFS); file now
  only contains the quick-capture classifier
- quick_capture.py: classify_capture_intent() now called with Config.OLLAMA_MODEL
- generation_task.py: remove intent_model_setting DB lookup and get_setting import;
  history summarization and research pipeline use the primary model directly
- research.py: remove intent_model parameter from run_research_pipeline() and
  _generate_sub_queries(); both use the model param throughout
- routes/settings.py: remove intent_model from model-key validation and response
- app.py: remove intent model pre-warming at startup
- SettingsView.vue: remove Intent Model selector and related refs/state

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-02 18:41:49 -05:00
parent 53e54ea761
commit 3d7be5888e
8 changed files with 26 additions and 223 deletions
+3 -6
View File
@@ -78,7 +78,7 @@ async def quick_capture_route():
if not text:
return jsonify({"error": "text is required"}), 400
intent_model = Config.OLLAMA_INTENT_MODEL or Config.OLLAMA_MODEL
model = Config.OLLAMA_MODEL
# Build tool list for this user, then restrict to capture-only operations.
all_tools = await get_tools_for_user(uid)
@@ -86,7 +86,7 @@ async def quick_capture_route():
t for t in all_tools if t.get("function", {}).get("name") in _CAPTURE_TOOL_NAMES
]
intent = await classify_capture_intent(text, capture_tools, intent_model)
intent = await classify_capture_intent(text, capture_tools, model)
if intent.should_execute:
# research_topic bypasses execute_tool — run the pipeline directly
@@ -94,9 +94,8 @@ async def quick_capture_route():
from fabledassistant.services.research import run_research_pipeline
topic = intent.arguments.get("topic", text)
model = Config.OLLAMA_MODEL
try:
note = await run_research_pipeline(topic, uid, model, intent_model)
note = await run_research_pipeline(topic, uid, model)
logger.info(
"Quick-capture uid=%d: research note id=%d '%s'",
uid, note.id, note.title,
@@ -114,7 +113,6 @@ async def quick_capture_route():
# For notes, run a second LLM pass to generate a proper title and
# well-formed body rather than using the raw capture text verbatim.
if intent.tool_name == "create_note":
model = Config.OLLAMA_MODEL
title, body = await _process_note(text, model)
intent.arguments["title"] = title
intent.arguments["body"] = body
@@ -141,7 +139,6 @@ async def quick_capture_route():
# Fallback: classify_capture_intent returned no-tool (e.g. LLM parse failure).
# Still process the text through the note enrichment pass.
model = Config.OLLAMA_MODEL
fallback_title, fallback_body = await _process_note(text, model)
result = await execute_tool(