From 148027af8ee942ea320476f20166b205b8aaaef2 Mon Sep 17 00:00:00 2001 From: GanymedeNil Date: Thu, 6 Aug 2026 15:39:17 +0800 Subject: [PATCH] chore: drop added commentary per repo guidance --- litellm/google_genai/streaming_iterator.py | 8 +------- .../vertex_passthrough_logging_handler.py | 5 ----- litellm/proxy/pass_through_endpoints/streaming_handler.py | 3 --- .../test_vertex_passthrough_logging_handler.py | 2 -- 4 files changed, 1 insertion(+), 17 deletions(-) diff --git a/litellm/google_genai/streaming_iterator.py b/litellm/google_genai/streaming_iterator.py index e1de1bea412..5effe0a936e 100644 --- a/litellm/google_genai/streaming_iterator.py +++ b/litellm/google_genai/streaming_iterator.py @@ -79,13 +79,7 @@ class BaseGoogleGenAIGenerateContentStreamingIterator: async def _handle_async_streaming_logging( self, ): - """Handle the logging after all chunks have been collected. - - ``url_route`` below carries no hostname, so the pass-through handler cannot - sniff the provider off it and would price every Google stream at Vertex rates. - ``custom_llm_provider`` is forwarded so costing uses the provider already - resolved for this request. - """ + """Handle the logging after all chunks have been collected.""" from litellm.proxy.pass_through_endpoints.streaming_handler import ( PassThroughStreamingHandler, ) diff --git a/litellm/proxy/pass_through_endpoints/llm_provider_handlers/vertex_passthrough_logging_handler.py b/litellm/proxy/pass_through_endpoints/llm_provider_handlers/vertex_passthrough_logging_handler.py index 4810b9d726a..97586b0db88 100644 --- a/litellm/proxy/pass_through_endpoints/llm_provider_handlers/vertex_passthrough_logging_handler.py +++ b/litellm/proxy/pass_through_endpoints/llm_provider_handlers/vertex_passthrough_logging_handler.py @@ -404,11 +404,6 @@ class VertexPassthroughLoggingHandler: - Builds complete response from chunks - Creates standard logging object - Logs in litellm callbacks - - ``custom_llm_provider`` is the provider the caller already resolved. Callers that - only know the upstream URL leave it unset and the provider is sniffed from the - hostname instead. Native google_genai streams pass it explicitly because their - url_route carries no hostname to sniff. """ kwargs: dict[str, Any] = {} model = model or VertexPassthroughLoggingHandler.extract_model_from_url(url_route) diff --git a/litellm/proxy/pass_through_endpoints/streaming_handler.py b/litellm/proxy/pass_through_endpoints/streaming_handler.py index 0851e1d0089..dd83e75d5a6 100644 --- a/litellm/proxy/pass_through_endpoints/streaming_handler.py +++ b/litellm/proxy/pass_through_endpoints/streaming_handler.py @@ -138,9 +138,6 @@ class PassThroughStreamingHandler: - Anthropic - Vertex AI - OpenAI - - ``custom_llm_provider`` lets a caller that already knows the provider skip the - URL-hostname sniffing the pass-through handlers fall back to. """ try: ( diff --git a/tests/test_litellm/proxy/pass_through_endpoints/llm_provider_handlers/test_vertex_passthrough_logging_handler.py b/tests/test_litellm/proxy/pass_through_endpoints/llm_provider_handlers/test_vertex_passthrough_logging_handler.py index a5cbca25bd0..522f88e1f16 100644 --- a/tests/test_litellm/proxy/pass_through_endpoints/llm_provider_handlers/test_vertex_passthrough_logging_handler.py +++ b/tests/test_litellm/proxy/pass_through_endpoints/llm_provider_handlers/test_vertex_passthrough_logging_handler.py @@ -11,8 +11,6 @@ from litellm.proxy.pass_through_endpoints.llm_provider_handlers.vertex_passthrou ) from litellm.types.utils import ModelResponse, Usage -# gemini/ and vertex_ai/ price this model differently (2x), so it is the only way to -# observe which rate card a code path actually used. MODEL = "gemini-3.1-flash-image" PROMPT_TOKENS = 1000 COMPLETION_TOKENS = 500