fix: skip model picker when auth choice preset
This commit is contained in:
committed by
Peter Steinberger
parent
dcc41e932d
commit
9f80d8ec7c
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user