Recover router availability after failed profile switch
This commit is contained in:
@@ -698,6 +698,11 @@ def switch_profile(profile: str, implicit: bool = False) -> None:
|
||||
up = upstream_status()
|
||||
ready = _profile_is_ready(profile, up)
|
||||
if cur == profile and ready:
|
||||
# A previous failed switch can leave the in-memory availability
|
||||
# flag set even though the controller and llama.cpp have since
|
||||
# recovered. The semantic readiness check above is authoritative,
|
||||
# so clear the stale flag before returning.
|
||||
_set_qwen_unavailable(False)
|
||||
log.info("Profil %s ist bereits aktiv", profile)
|
||||
return
|
||||
# Qwen wird neu geladen/gewechselt → für Chats nicht verfügbar.
|
||||
|
||||
Reference in New Issue
Block a user