From f7efddf7c97e18c621c1f20e92f2e376b1dfb99a Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Tue, 20 May 2025 10:50:18 -0700 Subject: [PATCH] fix: vertex llm base --- litellm/llms/vertex_ai/vertex_llm_base.py | 2 +- .../proxy/pass_through_endpoints/llm_passthrough_endpoints.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/litellm/llms/vertex_ai/vertex_llm_base.py b/litellm/llms/vertex_ai/vertex_llm_base.py index 9349fb56da9..b758f20ea70 100644 --- a/litellm/llms/vertex_ai/vertex_llm_base.py +++ b/litellm/llms/vertex_ai/vertex_llm_base.py @@ -312,7 +312,7 @@ class VertexBase: ) except Exception as e: verbose_logger.exception( - f"Failed to load vertex credentials. Check to see if credentials containing partial/invalid information. Error: {str(e)}" + f"Failed to load vertex credentials. Check to see if credentials containing partial/invalid information. Tried using project_id: {project_id}. Error: {str(e)}" ) raise e diff --git a/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py b/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py index 21df55c0840..2fdb289e3ce 100644 --- a/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py +++ b/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py @@ -687,8 +687,8 @@ async def _base_vertex_proxy_route( headers.pop("content-length", None) headers.pop("host", None) else: - vertex_project = vertex_credentials.vertex_project - vertex_location = vertex_credentials.vertex_location + vertex_project = vertex_credentials.vertex_project or vertex_project + vertex_location = vertex_credentials.vertex_location or vertex_location vertex_credentials_str = vertex_credentials.vertex_credentials _auth_header, vertex_project = await vertex_llm_base._ensure_access_token_async(