fix(vertex_httpx.py): fix supports system message check for vertex_ai_beta

Fixes https://github.com/BerriAI/litellm/issues/4283
This commit is contained in:
Krrish Dholakia 2024-06-19 13:17:22 -07:00
parent 7966266d4f
commit 0a96865c48
2 changed files with 8 additions and 2 deletions

View file

@ -709,8 +709,11 @@ class VertexLLM(BaseLLM):
## TRANSFORMATION ##
try:
_custom_llm_provider = custom_llm_provider
if custom_llm_provider == "vertex_ai_beta":
_custom_llm_provider = "vertex_ai"
supports_system_message = litellm.supports_system_messages(
model=model, custom_llm_provider=custom_llm_provider
model=model, custom_llm_provider=_custom_llm_provider
)
except Exception as e:
verbose_logger.error(