diff --git a/R/provider-gemini.R b/R/provider-gemini.R index 1f859c5d..81c7e7e1 100644 --- a/R/provider-gemini.R +++ b/R/provider-gemini.R @@ -567,7 +567,12 @@ default_google_credentials <- function( error_call = caller_env(), gemini = FALSE ) { +if (gemini) { gemini_scope <- "https://www.googleapis.com/auth/generative-language.retriever" +} else { + gemini_scope <- "https://www.googleapis.com/auth/cloud-vertex-ai.firstparty.predict" +} + check_string(api_key, allow_null = TRUE, call = error_call) api_key <- api_key %||% Sys.getenv("GOOGLE_API_KEY")