From 20fa33b11318894a0aa497435489404a67d7e734 Mon Sep 17 00:00:00 2001 From: Praveen11558 <44603409+Praveen11558@users.noreply.github.com> Date: Sun, 5 Jul 2026 21:12:53 +0530 Subject: [PATCH] fix: refactor HTTP handler initialization with client support --- .../vertex_ai/vertex_gemma_models/transformation.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/litellm/llms/vertex_ai/vertex_gemma_models/transformation.py b/litellm/llms/vertex_ai/vertex_gemma_models/transformation.py index 3bdef7e7445..2b1a7066585 100644 --- a/litellm/llms/vertex_ai/vertex_gemma_models/transformation.py +++ b/litellm/llms/vertex_ai/vertex_gemma_models/transformation.py @@ -129,11 +129,11 @@ class VertexGemmaConfig(OpenAIGPTConfig): @staticmethod def _sync_post( - client: Optional[Union[HTTPHandler, httpx.Client]], + client: HTTPHandler | httpx.Client | None, api_base: str, headers: dict, request_data: dict, - timeout: Optional[Union[float, httpx.Timeout]], + timeout: float | httpx.Timeout | None, ) -> httpx.Response: if isinstance(client, HTTPHandler): return client.post( @@ -164,11 +164,11 @@ class VertexGemmaConfig(OpenAIGPTConfig): @staticmethod async def _async_post( - client: Optional[Union[AsyncHTTPHandler, httpx.AsyncClient]], + client: AsyncHTTPHandler | httpx.AsyncClient | None, api_base: str, headers: dict, request_data: dict, - timeout: Optional[Union[float, httpx.Timeout]], + timeout: float | httpx.Timeout | None, ) -> httpx.Response: from litellm.llms.custom_httpx.http_handler import get_async_httpx_client from litellm.types.utils import LlmProviders @@ -214,7 +214,7 @@ class VertexGemmaConfig(OpenAIGPTConfig): acompletion: bool, litellm_params: dict, logger_fn: Optional[Callable] = None, - client: Optional[Union[HTTPHandler, AsyncHTTPHandler, httpx.Client, httpx.AsyncClient]] = None, + client: HTTPHandler | AsyncHTTPHandler | httpx.Client | httpx.AsyncClient | None = None, timeout: Optional[Union[float, httpx.Timeout]] = None, encoding=None, custom_llm_provider: str = "vertex_ai", @@ -267,7 +267,7 @@ class VertexGemmaConfig(OpenAIGPTConfig): logging_obj: Any, optional_params: dict, litellm_params: dict, - client: Optional[Union[HTTPHandler, httpx.Client]] = None, + client: HTTPHandler | httpx.Client | None = None, timeout: Optional[Union[float, httpx.Timeout]] = None, encoding: Any = None, ):