feat: add shared model picker to configure/onboarding

This commit is contained in:
Jonáš Jančařík authored and Peter Steinberger committed 2026-01-10 16:32:59 +00:00
1 parent e3cd431551
commit dcc41e932d
5 files changed
+342 -51

No files matched your search

+16
View File
@@ -4,6 +4,7 @@ import { ensureAuthProfileStore } from "../agents/auth-profiles.js";
import { DEFAULT_BOOTSTRAP_FILENAME } from "../agents/workspace.js";
import {
applyAuthChoice,
resolvePreferredProviderForAuthChoice,
warnIfModelConfigLooksOff,
} from "../commands/auth-choice.js";
import { buildAuthChoiceOptions } from "../commands/auth-choice-options.js";
@@ -14,6 +15,10 @@ import {
} from "../commands/daemon-runtime.js";
import { healthCommand } from "../commands/health.js";
import { formatHealthCheckFailure } from "../commands/health-format.js";
import {
applyPrimaryModel,
promptDefaultModel,
} from "../commands/model-picker.js";
import {
applyWizardMetadata,
DEFAULT_WORKSPACE,
@@ -343,6 +348,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);
}
await warnIfModelConfigLooksOff(nextConfig, prompter);
const port =