From 6556dcaa930acbaa0aacec2e97b85767506c9c55 Mon Sep 17 00:00:00 2001 From: Carmen Iniesta Date: Tue, 14 Jul 2026 16:52:18 +0200 Subject: [PATCH 1/3] Update driver.py --- agents/google/src/hyperforge_google/driver.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/agents/google/src/hyperforge_google/driver.py b/agents/google/src/hyperforge_google/driver.py index fdfb48a..ff901e9 100644 --- a/agents/google/src/hyperforge_google/driver.py +++ b/agents/google/src/hyperforge_google/driver.py @@ -1,7 +1,7 @@ import json from google.genai import Client -from google.oauth2 import service_account +from google.auth import load_credentials_from_dict # type: ignore from hyperforge.configure import driver from hyperforge.driver import Driver from typing_extensions import Self @@ -25,16 +25,19 @@ async def init(cls, driver: GoogleDriverConfig) -> Self: if driver.config.vertexai: if driver.config.credentials: info = json.loads(driver.config.credentials) - creds = service_account.Credentials.from_service_account_info( + credentials, project = load_credentials_from_dict( info, scopes=["https://www.googleapis.com/auth/cloud-platform"], ) + else: + project = driver.config.project_location + location = driver.config.location client = Client( vertexai=driver.config.vertexai, - credentials=creds, + credentials=credentials, api_key=driver.config.api_key, - project=driver.config.project, - location=driver.config.location, + project=project, + location=location, ) return cls( client=client, From 3a30b356972db77168bdafeeba5e375a935f24c4 Mon Sep 17 00:00:00 2001 From: Carmen Iniesta Date: Tue, 14 Jul 2026 16:55:40 +0200 Subject: [PATCH 2/3] Update driver.py --- agents/google/src/hyperforge_google/driver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agents/google/src/hyperforge_google/driver.py b/agents/google/src/hyperforge_google/driver.py index ff901e9..c7efbc8 100644 --- a/agents/google/src/hyperforge_google/driver.py +++ b/agents/google/src/hyperforge_google/driver.py @@ -30,7 +30,7 @@ async def init(cls, driver: GoogleDriverConfig) -> Self: scopes=["https://www.googleapis.com/auth/cloud-platform"], ) else: - project = driver.config.project_location + project = driver.config.location location = driver.config.location client = Client( vertexai=driver.config.vertexai, From 648ff74b8bfb2a2776745a8c8c1acba8b9bdc29f Mon Sep 17 00:00:00 2001 From: Carmen Iniesta Date: Tue, 14 Jul 2026 16:56:34 +0200 Subject: [PATCH 3/3] Update driver.py --- agents/google/src/hyperforge_google/driver.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/agents/google/src/hyperforge_google/driver.py b/agents/google/src/hyperforge_google/driver.py index c7efbc8..587dd59 100644 --- a/agents/google/src/hyperforge_google/driver.py +++ b/agents/google/src/hyperforge_google/driver.py @@ -1,7 +1,7 @@ import json -from google.genai import Client from google.auth import load_credentials_from_dict # type: ignore +from google.genai import Client from hyperforge.configure import driver from hyperforge.driver import Driver from typing_extensions import Self @@ -21,7 +21,8 @@ class GoogleDriver(Driver): @classmethod async def init(cls, driver: GoogleDriverConfig) -> Self: - creds = None + credentials = None + location = None if driver.config.vertexai: if driver.config.credentials: info = json.loads(driver.config.credentials)