From 9c45bfdb70d95b1c290b556f751cba8b35719157 Mon Sep 17 00:00:00 2001 From: Rena Lu Date: Wed, 14 Feb 2024 23:27:16 +0000 Subject: [PATCH] handle optional params --- litellm/utils.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/litellm/utils.py b/litellm/utils.py index ac26e08640d..9367db74b1b 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -4192,7 +4192,14 @@ def get_optional_params( optional_params["stop_sequences"] = stop if max_tokens is not None: optional_params["max_output_tokens"] = max_tokens - elif custom_llm_provider == "vertex_ai": + elif custom_llm_provider == "vertex_ai" and model in ( + litellm.vertex_chat_models + or model in litellm.vertex_code_chat_models + or model in litellm.vertex_text_models + or model in litellm.vertex_code_text_models + or model in litellm.vertex_language_models + or model in litellm.vertex_embedding_models + ): ## check if unsupported param passed in supported_params = [ "temperature",