From 39f6741e133e0ee52529d0805495165409c6131c Mon Sep 17 00:00:00 2001 From: SOUMITRO-SAHA Date: Tue, 31 Mar 2026 12:28:02 +0530 Subject: [PATCH] fix(provider): add required OAuth scope for Google authentication Add missing Google Cloud Platform scope to GoogleAuth initialization to ensure proper authentication with Vertex AI services. Without this scope, the authentication flow would fail when accessing Google Cloud resources. This fixes potential authentication issues in the provider implementation. --- packages/opencode/src/provider/provider.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/opencode/src/provider/provider.ts b/packages/opencode/src/provider/provider.ts index c6784f450244..0dc95ffa6236 100644 --- a/packages/opencode/src/provider/provider.ts +++ b/packages/opencode/src/provider/provider.ts @@ -460,7 +460,9 @@ export namespace Provider { project, location, fetch: async (input: RequestInfo | URL, init?: RequestInit) => { - const auth = new GoogleAuth() + const auth = new GoogleAuth({ + scopes: ["https://www.googleapis.com/auth/cloud-platform"], + }) const client = await auth.getApplicationDefault() const token = await client.credential.getAccessToken()