mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-17 23:51:30 +00:00
fix(ci): filter extra_headers from AsyncHTTPHandler params
extra_headers is only used for cache key generation, not as a constructor param for AsyncHTTPHandler. Filter it out like disable_aiohttp_transport to prevent TypeError. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
b0cb6557bd
commit
c8c258e343
1 changed files with 2 additions and 2 deletions
|
|
@ -1235,7 +1235,7 @@ def get_async_httpx_client(
|
|||
|
||||
if params is not None:
|
||||
# Filter out params that are only used for cache key, not for AsyncHTTPHandler.__init__
|
||||
handler_params = {k: v for k, v in params.items() if k != "disable_aiohttp_transport"}
|
||||
handler_params = {k: v for k, v in params.items() if k not in ("disable_aiohttp_transport", "extra_headers")}
|
||||
handler_params["shared_session"] = shared_session
|
||||
_new_client = AsyncHTTPHandler(**handler_params)
|
||||
else:
|
||||
|
|
@ -1284,7 +1284,7 @@ def _get_httpx_client(params: Optional[dict] = None) -> HTTPHandler:
|
|||
|
||||
if params is not None:
|
||||
# Filter out params that are only used for cache key, not for HTTPHandler.__init__
|
||||
handler_params = {k: v for k, v in params.items() if k != "disable_aiohttp_transport"}
|
||||
handler_params = {k: v for k, v in params.items() if k not in ("disable_aiohttp_transport", "extra_headers")}
|
||||
_new_client = HTTPHandler(**handler_params)
|
||||
else:
|
||||
_new_client = HTTPHandler(timeout=httpx.Timeout(timeout=600.0, connect=5.0))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue