From bbb15421b6fb612b0b1c8195ad69fb5917309f86 Mon Sep 17 00:00:00 2001 From: linhongyu510 Date: Sat, 29 Aug 2026 14:30:59 +0800 Subject: [PATCH] fix(search): avoid prohibited typing cast --- litellm/search/main.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/litellm/search/main.py b/litellm/search/main.py index 29addce1094..983bd4b3733 100644 --- a/litellm/search/main.py +++ b/litellm/search/main.py @@ -6,7 +6,7 @@ import asyncio import contextvars from collections.abc import Coroutine from functools import partial -from typing import Any, Final, cast +from typing import Any, Final import httpx @@ -250,9 +250,7 @@ def search( verbose_logger.debug("Search call - provider: %s", search_provider) auth_param_names: Final[frozenset[str]] = frozenset( - cast( # cast-ok: BaseAWSLLM exposes authentication parameter names as list[str] - list[str], getattr(search_provider_config, "aws_authentication_params", ()) - ) + name for name in getattr(search_provider_config, "aws_authentication_params", ()) if isinstance(name, str) ) auth_params: Final[dict[str, object]] = { # mutable-ok: isolated provider signing params key: kwargs.pop(key) for key in tuple(kwargs) if key in auth_param_names