fix: avoid unused custom preferred provider

This commit is contained in:
gejifeng
2026-02-11 08:58:17 +00:00
committed by Peter Steinberger
parent e6715bcb64
commit d44c118334
+2 -5
View File
@@ -379,7 +379,6 @@ export async function runOnboardingWizard(
includeSkip: true, includeSkip: true,
})); }));
let customPreferredProvider: string | undefined;
if (authChoice === "custom-api-key") { if (authChoice === "custom-api-key") {
const customResult = await promptCustomApiConfig({ const customResult = await promptCustomApiConfig({
prompter, prompter,
@@ -387,7 +386,6 @@ export async function runOnboardingWizard(
config: nextConfig, config: nextConfig,
}); });
nextConfig = customResult.config; nextConfig = customResult.config;
customPreferredProvider = customResult.providerId;
} else { } else {
const authResult = await applyAuthChoice({ const authResult = await applyAuthChoice({
authChoice, authChoice,
@@ -403,15 +401,14 @@ export async function runOnboardingWizard(
nextConfig = authResult.config; nextConfig = authResult.config;
} }
if (authChoiceFromPrompt) { if (authChoiceFromPrompt && authChoice !== "custom-api-key") {
const modelSelection = await promptDefaultModel({ const modelSelection = await promptDefaultModel({
config: nextConfig, config: nextConfig,
prompter, prompter,
allowKeep: true, allowKeep: true,
ignoreAllowlist: true, ignoreAllowlist: true,
includeVllm: true, includeVllm: true,
preferredProvider: preferredProvider: resolvePreferredProviderForAuthChoice(authChoice),
customPreferredProvider ?? resolvePreferredProviderForAuthChoice(authChoice),
}); });
if (modelSelection.config) { if (modelSelection.config) {
nextConfig = modelSelection.config; nextConfig = modelSelection.config;