fix: use explicit utf-8 encoding when reading llm.yaml in sidebar

This commit is contained in:
pyr0ball 2026-03-06 14:52:22 -08:00
parent 228912f112
commit 293df60a00

View file

@ -169,7 +169,7 @@ with st.sidebar:
try: try:
import yaml as _yaml import yaml as _yaml
from scripts.byok_guard import cloud_backends as _cloud_backends from scripts.byok_guard import cloud_backends as _cloud_backends
_active_cloud = _cloud_backends(_yaml.safe_load(_llm_cfg_path.read_text()) or {}) _active_cloud = _cloud_backends(_yaml.safe_load(_llm_cfg_path.read_text(encoding="utf-8")) or {})
except Exception: except Exception:
_active_cloud = [] _active_cloud = []
if _active_cloud: if _active_cloud: