refactor: move install flag set after wrapper installation

This commit is contained in:
ummon-v 2026-09-23 09:21:19 +02:00
parent 7ff614c262
commit d1eda1a70b
No known key found for this signature in database

View file

@ -60,11 +60,12 @@ def install() -> None:
global _installed # noqa: PLW0603
if _installed:
return
_installed = True
try:
_install_wrappers()
except Exception: # noqa: BLE001 - an SDK layout change degrades to the stock behavior
except Exception: # noqa: BLE001 - a transient failure retries on the next install() call
logger.warning("could not wrap the SDK chat-completions content handling", exc_info=True)
return
_installed = True
def _install_wrappers() -> None: