mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-11 22:51:28 +00:00
fix: reorder elif chain so rawPredict is checked before predict
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 <noreply@anthropic.com>
This commit is contained in:
parent
aeae28bda3
commit
1339513f8b
1 changed files with 7 additions and 7 deletions
|
|
@ -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 = (
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue