Skip to content

Commit

Permalink
Merge pull request #1657 from eslamkarim/patch-1
Browse files Browse the repository at this point in the history
Change quota project to the correct project being used for the call
  • Loading branch information
krrishdholakia authored Jan 30, 2024
2 parents efc5ec5 + 2b3965d commit c53ad87
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion litellm/llms/vertex_ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,11 @@ def completion(
GenerationConfig,
)
from google.cloud.aiplatform_v1beta1.types import content as gapic_content_types
import google.auth

vertexai.init(project=vertex_project, location=vertex_location)
## Load credentials with the correct quota project ref: https://github.com/googleapis/python-aiplatform/issues/2557#issuecomment-1709284744
creds, _ = google.auth.default(quota_project_id=vertex_project)
vertexai.init(project=vertex_project, location=vertex_location, credentials=creds)

## Load Config
config = litellm.VertexAIConfig.get_config()
Expand Down

0 comments on commit c53ad87

Please sign in to comment.