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:
@@ -25,18 +25,17 @@ async def update_settings_route():
|
||||
if not isinstance(data, dict):
|
||||
return jsonify({"error": "Expected a JSON object"}), 400
|
||||
|
||||
if "default_model" in data or "intent_model" in data:
|
||||
if "default_model" in data:
|
||||
installed = await get_installed_models()
|
||||
for key in ("default_model", "intent_model"):
|
||||
if key in data and data[key]:
|
||||
model = str(data[key])
|
||||
if installed and model not in installed:
|
||||
return jsonify({"error": f"Model '{model}' is not installed"}), 400
|
||||
if data["default_model"]:
|
||||
model = str(data["default_model"])
|
||||
if installed and model not in installed:
|
||||
return jsonify({"error": f"Model '{model}' is not installed"}), 400
|
||||
|
||||
# Empty string for model keys means "reset to system default".
|
||||
# Empty string for default_model means "reset to system default".
|
||||
# Delete the DB row so get_setting() falls back to Config defaults
|
||||
# rather than returning "" and breaking model resolution everywhere.
|
||||
_MODEL_KEYS = frozenset({"default_model", "intent_model"})
|
||||
_MODEL_KEYS = frozenset({"default_model"})
|
||||
to_save = {}
|
||||
for k, v in data.items():
|
||||
str_v = str(v)
|
||||
@@ -59,7 +58,6 @@ async def get_models_route():
|
||||
return jsonify({
|
||||
"models": models,
|
||||
"default_chat_model": Config.OLLAMA_MODEL,
|
||||
"default_intent_model": Config.OLLAMA_INTENT_MODEL,
|
||||
})
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user