Skip to content

Update API endpoint for Vertex AI, use working scope for auth #598

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 0 commits into from

Conversation

netique
Copy link

@netique netique commented Jun 28, 2025

No description provided.

@netique netique changed the title fix #523 update API endpoint for Vertex AI, use working scope for auth Update API endpoint for Vertex AI, use working scope for auth Jun 28, 2025
@netique
Copy link
Author

netique commented Jun 28, 2025

Possible fix for #523. It works for me.

@@ -580,7 +580,7 @@ default_google_credentials <- function(
error_call = caller_env(),
gemini = FALSE
) {
gemini_scope <- "https://www.googleapis.com/auth/generative-language.retriever"
gemini_scope <- "https://www.googleapis.com/auth/cloud-platform"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will break non-Vertex clients, we'll need a conditional here like in #559.

@@ -103,7 +103,7 @@ chat_google_vertex <- function(
# https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.endpoints/generateContent
vertex_url <- function(location, project_id) {
paste_c(
c("https://", location, "-aiplatform.googleapis.com/v1"),
c("https://aiplatform.googleapis.com/v1"),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did Vertex change their URL structure? Or did this never work?

@netique
Copy link
Author

netique commented Aug 10, 2025

I have encountered some Git issues, reopening in #704.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants