diff --git a/litellm/llms/anthropic/common_utils.py b/litellm/llms/anthropic/common_utils.py index cb50df64301..36372e7b4e5 100644 --- a/litellm/llms/anthropic/common_utils.py +++ b/litellm/llms/anthropic/common_utils.py @@ -189,7 +189,7 @@ def _fetch_anthropic_model_ids( collected: tuple[str, ...] = () # rebind-ok: accumulates one page of ids per iteration cursor: str | None = after_id # rebind-ok: advances to each page's last_id for _ in range(max(pages_left, 0)): - page: Final = _fetch_anthropic_models_page(api_base, headers, cursor) + page = _fetch_anthropic_models_page(api_base, headers, cursor) # rebind-ok: one page per iteration collected += tuple(entry.id for entry in page.data) if not page.has_more or page.last_id is None: return collected diff --git a/litellm/llms/anthropic/wif.py b/litellm/llms/anthropic/wif.py index 4be1a1e7ae1..7900bcebcd7 100644 --- a/litellm/llms/anthropic/wif.py +++ b/litellm/llms/anthropic/wif.py @@ -278,7 +278,7 @@ def _strip_path_suffixes(path: str) -> str: token URL. Each pass removes at most one suffix, so the loop is bounded by the segment count.""" trimmed = path.rstrip("/") # rebind-ok: fixed-point strip, one suffix per pass while True: - shortened: Final = next( + shortened = next( # rebind-ok: one suffix removed per iteration (trimmed.removesuffix(suffix) for suffix in _CHAT_BASE_SUFFIXES if trimmed.endswith(suffix)), trimmed, )