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(vertex_httpx.py): return project id, if given

Krrish Dholakia4e9f66bc7ea7
diff --git a/litellm/llms/vertex_httpx.py b/litellm/llms/vertex_httpx.py
index 29d5854b400..faecdd79026 100644
--- a/litellm/llms/vertex_httpx.py
+++ b/litellm/llms/vertex_httpx.py
@@ -1095,7 +1095,7 @@ class VertexLLM(BaseLLM):
if not self._credentials or not self._credentials.token:
raise RuntimeError("Could not resolve API token from the environment")
- return self._credentials.token, self.project_id
+ return self._credentials.token, project_id or self.project_id
def is_using_v1beta1_features(self, optional_params: dict) -> bool:
"""