diff --git a/src/commands/onboard-non-interactive/local/auth-choice.ts b/src/commands/onboard-non-interactive/local/auth-choice.ts index 62c7fe8ed..e4d4e3f0e 100644 --- a/src/commands/onboard-non-interactive/local/auth-choice.ts +++ b/src/commands/onboard-non-interactive/local/auth-choice.ts @@ -257,6 +257,9 @@ export async function applyNonInteractiveAuthChoice(params: { if (!resolved) { return null; } + if (resolved.source !== "profile") { + setXaiApiKey(resolved.key); + } nextConfig = applyAuthProfileConfig(nextConfig, { profileId: "xai:default", provider: "xai",