mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
fix(search): avoid prohibited typing cast
This commit is contained in:
parent
6483b71b3c
commit
bbb15421b6
1 changed files with 2 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue