Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

fix: support vertex path

Moch. Ainun Najib4e9e6a972bfe
diff --git a/litellm/llms/vertex_httpx.py b/litellm/llms/vertex_httpx.py
index 142cabbe961..aec92579bdd 100644
--- a/litellm/llms/vertex_httpx.py
+++ b/litellm/llms/vertex_httpx.py
@@ -790,7 +790,10 @@ class VertexLLM(BaseLLM):
if credentials is not None and isinstance(credentials, str):
import google.oauth2.service_account
- json_obj = json.loads(credentials)
+ if os.path.exists(credentials):
+ json_obj = json.load(open(credentials))
+ else:
+ json_obj = json.loads(credentials)
creds = google.oauth2.service_account.Credentials.from_service_account_info(
json_obj,