From 192c970be663b1bfd2af4578c9626b2a19178b56 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Wed, 28 Feb 2024 11:35:29 -0800 Subject: [PATCH] (fix) maintain backwards compat with vertex_ai_project --- litellm/main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/litellm/main.py b/litellm/main.py index 44bebb35153..433e7be312e 100644 --- a/litellm/main.py +++ b/litellm/main.py @@ -1468,11 +1468,13 @@ def completion( elif custom_llm_provider == "vertex_ai": vertex_ai_project = ( optional_params.pop("vertex_project", None) + or optional_params.pop("vertex_ai_project", None) or litellm.vertex_project or get_secret("VERTEXAI_PROJECT") ) vertex_ai_location = ( optional_params.pop("vertex_location", None) + or optional_params.pop("vertex_ai_location", None) or litellm.vertex_location or get_secret("VERTEXAI_LOCATION") ) @@ -2567,11 +2569,13 @@ def embedding( elif custom_llm_provider == "vertex_ai": vertex_ai_project = ( optional_params.pop("vertex_project", None) + or optional_params.pop("vertex_ai_project", None) or litellm.vertex_project or get_secret("VERTEXAI_PROJECT") ) vertex_ai_location = ( optional_params.pop("vertex_location", None) + or optional_params.pop("vertex_ai_location", None) or litellm.vertex_location or get_secret("VERTEXAI_LOCATION") )