Fix: Agent-Hirn-Umschaltung schreibt model.default (Hermes' aktives Modell)
update_brain_model setzte nur model.model, aber Hermes nutzt model.default als aktives Modell (model.model = Provider-Param) -> die Hirn-Umschaltung via MC2-UI griff nicht. Jetzt werden beide Keys gesetzt; agent_status liest default (Fallback model). Kontext: Hirn von Hermes-4-14B auf fast (Qwen3.6-35B-A3B) umgestellt - Hermes-Modelle sind laut hermes-agent nicht agentic; Qwen3.6-35B-A3B ist tool-faehig/agentic (verifiziert), warm und MoE. Terminal-Agentic-Warnung danach weg. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -155,7 +155,9 @@ def agent_status() -> dict:
|
|||||||
with config_path.open("r", encoding="utf-8") as f:
|
with config_path.open("r", encoding="utf-8") as f:
|
||||||
cfg = r_yaml.load(f) or {}
|
cfg = r_yaml.load(f) or {}
|
||||||
if isinstance(cfg, dict):
|
if isinstance(cfg, dict):
|
||||||
brain_model = cfg.get("model", {}).get("model", "auto")
|
# Hermes nutzt model.default als aktives Modell (model.model = Provider-Param).
|
||||||
|
m = cfg.get("model", {}) or {}
|
||||||
|
brain_model = m.get("default") or m.get("model") or "auto"
|
||||||
except Exception:
|
except Exception:
|
||||||
log.debug("agent_status: Hermes-config.yaml nicht lesbar", exc_info=True)
|
log.debug("agent_status: Hermes-config.yaml nicht lesbar", exc_info=True)
|
||||||
|
|
||||||
@@ -228,6 +230,9 @@ def update_brain_model(new_model: str) -> bool:
|
|||||||
if "model" not in cfg or not isinstance(cfg["model"], dict):
|
if "model" not in cfg or not isinstance(cfg["model"], dict):
|
||||||
cfg["model"] = {}
|
cfg["model"] = {}
|
||||||
|
|
||||||
|
# Hermes liest model.default als aktives Modell; model.model ist der Provider-Param.
|
||||||
|
# Beide setzen, sonst greift die Umschaltung nicht (latenter Bug: nur model.model gesetzt).
|
||||||
|
cfg["model"]["default"] = new_model
|
||||||
cfg["model"]["model"] = new_model
|
cfg["model"]["model"] = new_model
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user