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, {
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);