From 26799d9a18574cde2e9fbe70a3e9e087ed4e0ece Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Mon, 25 May 2026 14:23:05 +0000 Subject: [PATCH] Studio: pre-check Codex default models when creating the connection First-run UX bug surfaced by an end-to-end probe: after the user adds the "OpenAI Codex (local CLI)" connection from Settings -> Connections -> Add provider, every model in the form starts UNCHECKED. The user saves, returns to the chat composer, opens the model picker -- and the "Connected" tab is missing because no Codex models are enabled. The user has to re-open the connection, tick at least one model, save again, then return to chat. Two round-trips to make a feature work that the rest of the UI already advertises as installed. Anthropic / OpenAI / OpenRouter all keep their explicit-opt-in defaults because the model choice has billing and capability impact. Codex is the local CLI on the same machine -- the SDK accepts any model id, the "default_models" list is the SDK's curated shortlist, and gating chat behind a manual click adds friction without buying anything. Pre-checking all default models for Codex (and only Codex) makes the path "click Add -> click Save -> chat works" survive a single click sequence, matching the empirical setup we walked through in the e2e probe. --- .../src/features/chat/chat-providers-dialog.tsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/studio/frontend/src/features/chat/chat-providers-dialog.tsx b/studio/frontend/src/features/chat/chat-providers-dialog.tsx index bcbab008ed..faa06afef4 100644 --- a/studio/frontend/src/features/chat/chat-providers-dialog.tsx +++ b/studio/frontend/src/features/chat/chat-providers-dialog.tsx @@ -365,8 +365,18 @@ export function ChatProvidersSettings({ // providers and local OpenAI-compat presets stay empty until the user // clicks "Load available models". const seedDefaults = entry.model_list_mode === "curated"; - setAvailableModels(seedDefaults ? [...entry.default_models] : []); - setSelectedModelIds([]); + const defaults = seedDefaults ? [...entry.default_models] : []; + setAvailableModels(defaults); + // Codex is a local CLI, not a metered cloud account, so checking all of + // the SDK's default model ids by default is safe and avoids the + // first-run UX trap where users create the connection, never check any + // model, and then the "Connected" tab silently never appears in the + // chat model picker. Anthropic / OpenAI / etc. still need explicit + // model selection because the choice has billing and capability + // consequences. + setSelectedModelIds( + providerType === CODEX_PROVIDER_TYPE ? defaults : [], + ); setManualModelIds(""); setModelSearchQuery(""); setBaseUrlDraft("");