From edea3ef5de0ba31c6df3e2747acc354fbd93f14b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 21 Jul 2026 21:46:57 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- studio/backend/routes/inference.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/studio/backend/routes/inference.py b/studio/backend/routes/inference.py index 7a5852b2ce..606dc1eacc 100644 --- a/studio/backend/routes/inference.py +++ b/studio/backend/routes/inference.py @@ -4154,7 +4154,6 @@ def _maybe_unsupported_message(msg: str) -> str: def _raise_if_sidecar_swap_in_progress() -> None: from utils.transformers_version import sidecar_swap_in_progress - if sidecar_swap_in_progress(): raise HTTPException( status_code = 409, @@ -4182,6 +4181,7 @@ async def load_model( # install can reserve while this request queues on the gate, so the pre-gate # check alone is only a fast path. from core.inference.llama_keepwarm import inference_lifecycle_gate + _raise_if_sidecar_swap_in_progress() # Hold the lifecycle gate across the load so idle auto-unload can't unload the # model mid-load. Auto-switch calls _load_model_impl directly since it already