feat: add shared model picker to configure/onboarding

This commit is contained in:
Jonáš Jančařík
2026-01-09 22:01:57 +01:00
committed by Peter Steinberger
parent e3cd431551
commit dcc41e932d
5 changed files with 342 additions and 51 deletions

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 =