feat(models): auto-mode intent remap + real coder models in preference
Settings "Auto model routing" picks which installed model fires for chat vs coding intent when no model is pinned (auto_chat_model / auto_code_model). _auto_select_model honors the remap; _MODEL_PREFERENCE["code"] prefers real coder models first. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -104,6 +104,11 @@ async def _auto_select_model(message: str = "") -> str:
|
||||
if s.get("model"):
|
||||
return s["model"]
|
||||
intent = _detect_intent(message) if message else "chat"
|
||||
# Auto-mode remap: a configured model for this intent fires first;
|
||||
# otherwise fall back to the built-in preference list.
|
||||
remap = s.get(f"auto_{intent}_model")
|
||||
if remap:
|
||||
return remap
|
||||
return await get_ollama_manager().select_best_model(intent)
|
||||
except Exception:
|
||||
return DEFAULT_CHAT_MODEL
|
||||
|
||||
Reference in New Issue
Block a user