From 1339513f8bfae0d701ba3bf464ec03e135314dee Mon Sep 17 00:00:00 2001 From: Harshit28j Date: Sat, 7 Mar 2026 04:28:13 +0530 Subject: [PATCH] fix: reorder elif chain so rawPredict is checked before predict MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The generic "predict" in url_route check was shadowing the "rawPredict" branch because "predict" is a substring of "rawPredict". This made the meta publisher detection and partner model config routing dead code for rawPredict URLs. Reorder: predictLongRunning → generateContent → rawPredict → predict Co-Authored-By: Claude Opus 4.6 --- .../vertex_passthrough_logging_handler.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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 4a2e45ca2e7..8dc9e16eb85 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 @@ -130,13 +130,6 @@ class VertexPassthroughLoggingHandler: "kwargs": kwargs, } - elif "predict" in url_route: - return VertexPassthroughLoggingHandler._handle_predict_response( - httpx_response=httpx_response, - logging_obj=logging_obj, - url_route=url_route, - kwargs=kwargs, - ) elif "rawPredict" in url_route or "streamRawPredict" in url_route: from litellm.llms.vertex_ai.vertex_ai_partner_models import ( get_vertex_ai_partner_model_config, @@ -191,6 +184,13 @@ class VertexPassthroughLoggingHandler: "result": litellm_prediction_response, "kwargs": kwargs, } + elif "predict" in url_route: + return VertexPassthroughLoggingHandler._handle_predict_response( + httpx_response=httpx_response, + logging_obj=logging_obj, + url_route=url_route, + kwargs=kwargs, + ) elif "search" in url_route: litellm_vs_response = (