From 8130717e1ecd67dff964e2ecec1eac1a49212d4b Mon Sep 17 00:00:00 2001 From: ytnk531 Date: Fri, 1 Aug 2025 07:44:39 +0900 Subject: [PATCH] Fix incorrect usage of auth scope in Google::Auth.get_application_default Updated the method call to pass the auth scopes as an array inside the `options` hash, instead of directly as the `scope` argument. This ensures that authentication is configured correctly, per the expected interface: https://github.com/googleapis/google-auth-library-ruby/blob/googleauth/v1.14.0/lib/googleauth/application_default.rb#L53 --- lib/langchain/llm/google_vertexai.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/langchain/llm/google_vertexai.rb b/lib/langchain/llm/google_vertexai.rb index a59ba95dd..bd709becc 100644 --- a/lib/langchain/llm/google_vertexai.rb +++ b/lib/langchain/llm/google_vertexai.rb @@ -28,7 +28,7 @@ class GoogleVertexAI < Base def initialize(project_id:, region:, default_options: {}) depends_on "googleauth" - @authorizer = ::Google::Auth.get_application_default(scope: [ + @authorizer = ::Google::Auth.get_application_default([ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/generative-language.retriever" ])