mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-26 06:03:19 +00:00
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
This commit is contained in:
parent
4a1c7b7053
commit
291b4e5296
1 changed files with 2 additions and 2 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue