Files
MoFin/scripts/test_key7_guard.py
T
hmo e0f47f9349 fix(xmpp_monitor): exclude key7(kimi) from auto-heal switch candidates
zhiwei must stay on ocg-key6 (deepseek-v4-flash) per user decision.
key7 is kimi — different model provider, incompatible model name.
If best_key returns key7, auto_heal logs skip_switch instead of switching.
2026-07-19 22:09:15 +08:00

12 lines
534 B
Python

import sys, json
sys.path.insert(0, '/home/hmo/MoFin')
import importlib, xmpp_logger
importlib.reload(xmpp_logger)
x = xmpp_logger
print("current provider:", x.current_provider())
print("KEY_TO_PROVIDER keys:", list(x.KEY_TO_PROVIDER.keys()))
bk = x.best_key()
print("best_key:", bk["key_id"] if bk else None, "| total_keys:", bk.get("total_keys") if bk else "-")
# Simulate: if best key were key7 (kimi), auto_heal must skip switch
result = x.auto_heal()
print("auto_heal actions:", json.dumps(result["actions"], ensure_ascii=False))