Skip to content

Commit

Permalink
GCP VertexAI: handle case when google.auth.default() uses a service a…
Browse files Browse the repository at this point in the history
…ccount (#579)

Co-authored-by: Jason Baker <[email protected]>
  • Loading branch information
jtbaker and Jason Baker authored Jan 2, 2025
1 parent b8648e8 commit c53c4e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pydantic_ai_slim/pydantic_ai/models/vertexai.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def _creds_from_file(service_account_file: str | Path) -> ServiceAccountCredenti
# pyright: reportUnknownVariableType=false
# pyright: reportUnknownArgumentType=false
async def _async_google_auth() -> tuple[BaseCredentials, str | None]:
return await run_in_executor(google.auth.default)
return await run_in_executor(google.auth.default, scopes=['https://www.googleapis.com/auth/cloud-platform'])


# default expiry is 3600 seconds
Expand Down

0 comments on commit c53c4e1

Please sign in to comment.