From 7ddc82f25da34a2648a27c2b5f892c7f7916d5ad Mon Sep 17 00:00:00 2001 From: Prakhar Pandey Date: Tue, 14 Jul 2026 13:10:52 +0530 Subject: [PATCH] feat: remove model-name entry from onboarding to match connect-only settings Onboarding still asked for a model name for openrouter/aigateway/ollama/ openai-compatible. It now mirrors the settings dialog: entering a key (or base URL) is enough and the model is resolved silently from the fetched list (same precedence), with openai-compatible keeping a visible Model field as its escape hatch. Save payload shape and multi-provider flow unchanged. --- .../onboarding/steps/llm-setup-step.tsx | 21 +++++++--------- .../onboarding/use-onboarding-state.ts | 25 +++++++++++++------ 2 files changed, 27 insertions(+), 19 deletions(-) diff --git a/apps/x/apps/renderer/src/components/onboarding/steps/llm-setup-step.tsx b/apps/x/apps/renderer/src/components/onboarding/steps/llm-setup-step.tsx index 4ece02c9..86787753 100644 --- a/apps/x/apps/renderer/src/components/onboarding/steps/llm-setup-step.tsx +++ b/apps/x/apps/renderer/src/components/onboarding/steps/llm-setup-step.tsx @@ -42,14 +42,11 @@ export function LlmSetupStep({ state }: LlmSetupStepProps) { } = state const isMoreProvider = moreProviders.some(p => p.id === llmProvider) - // Hosted providers (openai/anthropic/google) get a default model, so we only - // ask for a model on providers that truly need one (local/custom/gateway), - // or as a fallback if no model is set yet. - // Hosted providers (openai/anthropic/google) fetch their models from the API - // key on test, so they never need a manual model field. Only local/custom/ - // gateway providers, where the user must specify a model, show the input. - const hostedProviders: LlmProviderFlavor[] = ["openai", "anthropic", "google"] - const showModelInput = !hostedProviders.includes(llmProvider) + // Connect-only, mirroring Settings: entering a key (or base URL) is enough + // and the model is resolved silently at save. openai-compatible is the sole + // exception with a visible Model field — its /models endpoint often doesn't + // exist, so a typed value must be able to win. + const showModelInput = llmProvider === "openai-compatible" const renderProviderCard = (provider: typeof primaryProviders[0], index: number) => { const isSelected = llmProvider === provider.id @@ -150,9 +147,9 @@ export function LlmSetupStep({ state }: LlmSetupStepProps) { {/* Provider configuration */}
- {/* Cloud providers get a default model auto-selected; only local/custom - providers (no catalog) need a model here. Users can pick any of the - provider's models later in the chat view. */} + {/* Every provider resolves its model silently at save. openai-compatible + alone keeps this field, since its /models is unreliable and a typed + value must win; leaving it blank auto-selects from the fetched list. */} {showModelInput && (