From bc730b2c0fb1250cd83a4e5c28527615080953f1 Mon Sep 17 00:00:00 2001 From: Yulong Wu <50110323+TNTCompany@users.noreply.github.com> Date: Wed, 13 May 2026 01:02:15 +0800 Subject: [PATCH] fix (telemetry): inject quota_project_id to prevent fallback to default oauth client (#26698) Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Tommaso Sciortino --- packages/core/src/code_assist/oauth2.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/core/src/code_assist/oauth2.ts b/packages/core/src/code_assist/oauth2.ts index 8ea83e5270..588a313ef9 100644 --- a/packages/core/src/code_assist/oauth2.ts +++ b/packages/core/src/code_assist/oauth2.ts @@ -60,6 +60,10 @@ async function triggerPostAuthCallbacks(tokens: Credentials) { refresh_token: tokens.refresh_token ?? undefined, // Ensure null is not passed type: 'authorized_user', client_email: userAccountManager.getCachedGoogleAccount() ?? undefined, + quota_project_id: + process.env['GOOGLE_CLOUD_QUOTA_PROJECT'] || + process.env['GOOGLE_CLOUD_PROJECT'] || + process.env['GOOGLE_CLOUD_PROJECT_ID'], }; // Execute all registered post-authentication callbacks.