fix(core): propagate User-Agent header to setup-phase CodeAssist API calls (#19182)

This commit is contained in:
Gaurav
2026-02-15 19:20:22 -08:00
committed by GitHub
parent 6eec9f3350
commit 8979fc5f6a
4 changed files with 31 additions and 2 deletions
+3 -1
View File
@@ -12,6 +12,7 @@ import type {
OnboardUserRequest,
} from './types.js';
import { UserTierId, IneligibleTierReasonCode } from './types.js';
import type { HttpOptions } from './server.js';
import { CodeAssistServer } from './server.js';
import type { AuthClient } from 'google-auth-library';
import type { ValidationHandler } from '../fallback/types.js';
@@ -77,6 +78,7 @@ export interface UserData {
export async function setupUser(
client: AuthClient,
validationHandler?: ValidationHandler,
httpOptions: HttpOptions = {},
): Promise<UserData> {
const projectId =
process.env['GOOGLE_CLOUD_PROJECT'] ||
@@ -85,7 +87,7 @@ export async function setupUser(
const caServer = new CodeAssistServer(
client,
projectId,
{},
httpOptions,
'',
undefined,
undefined,