From 291b4e5296f88fb7afb520df6613cf265d3e5982 Mon Sep 17 00:00:00 2001 From: Jack Danger Date: Mon, 19 Oct 2026 07:47:08 +0000 Subject: [PATCH] fix(proxy): make the iterative path decode loop-carried (basedpyright reportGeneralTypeIssues) The decode loop reassigned a Final-named variable; pyright flags the reassignment at the rebase gate. The value is a loop-carried local, so it carries the mutable-ok receipt. Generated-by: termag --- .../proxy/pass_through_endpoints/llm_passthrough_endpoints.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py b/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py index d51e7437854..5d7218ab494 100644 --- a/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py +++ b/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py @@ -3538,12 +3538,12 @@ def openai_proxy_gate( decoded path.""" if is_proxy_admin(user_api_key_dict): return - decoded: Final = endpoint_path + decoded = endpoint_path for _ in range(3): step: Final = unquote(decoded) if step == decoded: break - decoded = step + decoded = step # mutable-ok: the decode loop converges and the mutated value is the local decision input normalized: Final = posixpath.normpath(f"/{decoded.strip('/')}") canonical: Final = _strip_openai_version_prefix(normalized) if canonical.lower().startswith(_OPENAI_PASSTHROUGH_MANAGEMENT_PREFIXES):