From 9f80d8ec7c6b328607c4b062c205d886437da146 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Jan=C4=8Da=C5=99=C3=ADk?= Date: Fri, 9 Jan 2026 23:13:25 +0100 Subject: [PATCH] fix: skip model picker when auth choice preset --- src/wizard/onboarding.ts | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/wizard/onboarding.ts b/src/wizard/onboarding.ts index b22e4d839..ed5e6d2bb 100644 --- a/src/wizard/onboarding.ts +++ b/src/wizard/onboarding.ts @@ -328,6 +328,7 @@ export async function runOnboardingWizard( const authStore = ensureAuthProfileStore(undefined, { allowKeychainPrompt: false, }); + const authChoiceFromPrompt = opts.authChoice === undefined; const authChoice = opts.authChoice ?? ((await prompter.select({ @@ -348,15 +349,17 @@ export async function runOnboardingWizard( }); nextConfig = authResult.config; - const modelSelection = await promptDefaultModel({ - config: nextConfig, - prompter, - allowKeep: true, - ignoreAllowlist: true, - preferredProvider: resolvePreferredProviderForAuthChoice(authChoice), - }); - if (modelSelection.model) { - nextConfig = applyPrimaryModel(nextConfig, modelSelection.model); + if (authChoiceFromPrompt) { + const modelSelection = await promptDefaultModel({ + config: nextConfig, + prompter, + allowKeep: true, + ignoreAllowlist: true, + preferredProvider: resolvePreferredProviderForAuthChoice(authChoice), + }); + if (modelSelection.model) { + nextConfig = applyPrimaryModel(nextConfig, modelSelection.model); + } } await warnIfModelConfigLooksOff(nextConfig, prompter);