fix: skip model picker when auth choice preset

This commit is contained in:
Jonáš Jančařík
2026-01-09 23:13:25 +01:00
committed by Peter Steinberger
parent dcc41e932d
commit 9f80d8ec7c

View File

@@ -328,6 +328,7 @@ export async function runOnboardingWizard(
const authStore = ensureAuthProfileStore(undefined, { const authStore = ensureAuthProfileStore(undefined, {
allowKeychainPrompt: false, allowKeychainPrompt: false,
}); });
const authChoiceFromPrompt = opts.authChoice === undefined;
const authChoice = const authChoice =
opts.authChoice ?? opts.authChoice ??
((await prompter.select({ ((await prompter.select({
@@ -348,15 +349,17 @@ export async function runOnboardingWizard(
}); });
nextConfig = authResult.config; nextConfig = authResult.config;
const modelSelection = await promptDefaultModel({ if (authChoiceFromPrompt) {
config: nextConfig, const modelSelection = await promptDefaultModel({
prompter, config: nextConfig,
allowKeep: true, prompter,
ignoreAllowlist: true, allowKeep: true,
preferredProvider: resolvePreferredProviderForAuthChoice(authChoice), ignoreAllowlist: true,
}); preferredProvider: resolvePreferredProviderForAuthChoice(authChoice),
if (modelSelection.model) { });
nextConfig = applyPrimaryModel(nextConfig, modelSelection.model); if (modelSelection.model) {
nextConfig = applyPrimaryModel(nextConfig, modelSelection.model);
}
} }
await warnIfModelConfigLooksOff(nextConfig, prompter); await warnIfModelConfigLooksOff(nextConfig, prompter);