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 <sciortino@gmail.com>
This commit is contained in:
Yulong Wu
2026-05-13 01:02:15 +08:00
committed by GitHub
parent 9fe8643552
commit bc730b2c0f
+4
View File
@@ -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.