Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion litellm/llms/openai/common_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def get_cached_openai_client(
return _cached_client

@staticmethod
def owns_wrapped_http_client(http_client: Optional[Union[httpx.Client, httpx.AsyncClient]]) -> bool:
def owns_wrapped_http_client(http_client: httpx.Client | httpx.AsyncClient | None) -> bool:
"""Whether litellm may close an SDK client built around ``http_client``.

``_get_async_http_client`` / ``_get_sync_http_client`` hand back
Expand Down
2 changes: 1 addition & 1 deletion litellm/llms/openai/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ def _get_openai_client(
if cached_client:
if isinstance(cached_client, OpenAI) or isinstance(cached_client, AsyncOpenAI):
return cached_client
http_client: Optional[Union[httpx.Client, httpx.AsyncClient]] = (
http_client: httpx.Client | httpx.AsyncClient | None = (
OpenAIChatCompletion._get_async_http_client(shared_session=shared_session)
if is_async
else OpenAIChatCompletion._get_sync_http_client()
Expand Down
Loading