From d1eda1a70be59a47ba2f22c2184d2e27e7b7f0da Mon Sep 17 00:00:00 2001 From: ummon-v <252456890+ummon-v@users.noreply.github.com> Date: Wed, 23 Sep 2026 09:21:19 +0200 Subject: [PATCH] refactor: move install flag set after wrapper installation --- strix/llm/chat_content_compat.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/strix/llm/chat_content_compat.py b/strix/llm/chat_content_compat.py index 68e9fe56..e67c6a58 100644 --- a/strix/llm/chat_content_compat.py +++ b/strix/llm/chat_content_compat.py @@ -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: