The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(desktop): require the provider slug in setOnboardingModel
teknium1fbcc60595692
diff --git a/apps/desktop/src/store/onboarding.ts b/apps/desktop/src/store/onboarding.tsindex 00e79272079..b81b650bcad 100644--- a/apps/desktop/src/store/onboarding.ts+++ b/apps/desktop/src/store/onboarding.ts@@ -1182,7 +1182,7 @@ export async function saveOnboardingLocalEndpoint(baseUrl: string, apiKey: strin// model only provider B has; chat errors "provider doesn't have the// selected model"). Also keep the flow's providerSlug/label in sync so the// confirm card shows the provider that actually serves the picked model.-export async function setOnboardingModel(model: string, providerSlug?: string, label?: string) {+export async function setOnboardingModel(model: string, providerSlug: string, label?: string) {const generation = flowGenerationconst { flow } = $desktopOnboarding.get()@@ -1190,19 +1190,18 @@ export async function setOnboardingModel(model: string, providerSlug?: string, lreturn}- // Fall back to the sign-in provider when the caller doesn't know the- // model's provider (back-compat) — the confirm card always has both.- const provider = (providerSlug || flow.providerSlug).trim() || flow.providerSlug+ // The picker may not know the provider's display name yet (catalog still+ // loading); keep the current label rather than blanking the card.const displayLabel = label || flow.label// Optimistic update so the dropdown feels instant; revert on failure.const previous = { currentModel: flow.currentModel, label: flow.label, providerSlug: flow.providerSlug }- setFlow({ ...flow, currentModel: model, providerSlug: provider, label: displayLabel, saving: true })+ setFlow({ ...flow, currentModel: model, providerSlug, label: displayLabel, saving: true })try {await setMainModelAssignment({- provider,+ provider: providerSlug,model},flowProfile ?? $desktopOnboarding.get().targetProfile@@ -1215,7 +1214,7 @@ export async function setOnboardingModel(model: string, providerSlug?: string, lconst current = $desktopOnboarding.get().flowif (current.status === 'confirming_model') {- setFlow({ ...current, currentModel: model, providerSlug: provider, label: displayLabel, saving: false })+ setFlow({ ...current, currentModel: model, providerSlug, label: displayLabel, saving: false })}} catch (error) {if (generation !== flowGeneration) {