Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
TypeScript ai-agentcoding-agentdesktop-appelectronglobali18nlocal-firstmcppipi-agentpi-desktoppluginsreactrusttypescript
feat(settings): land the model settings pane rework from this checkout
vastsa3dadc00d52bd
diff --git a/apps/desktop/electron/main/ipc/provider-ipc.ts b/apps/desktop/electron/main/ipc/provider-ipc.tsindex a6abd10b8..2ab8f5cef 100644--- a/apps/desktop/electron/main/ipc/provider-ipc.ts+++ b/apps/desktop/electron/main/ipc/provider-ipc.ts@@ -651,10 +651,14 @@ export function registerProviderIpc({// The endpoint published nothing usable (no /models route, an auth error,// or an empty list). The catalog is the fallback, not the primary source.+ // The list is the service's own published set, so a key that can call an+ // embedding or image endpoint sees it here too; nothing is preselected+ // from those, and `recommendModels` still picks chat models only.const catalogModels = modelsDevCatalog.modelsForProvider({vendorKey: catalogVendorKey,baseUrl: endpointBaseUrl,providerId: provider?.id ?? "",+ includeNonChat: true,});if (catalogModels.length > 0) {return {diff --git a/apps/desktop/src/components/settings/ChosenModelsSummary.tsx b/apps/desktop/src/components/settings/ChosenModelsSummary.tsxdeleted file mode 100644index 69244c8ec..000000000--- a/apps/desktop/src/components/settings/ChosenModelsSummary.tsx+++ /dev/null@@ -1,110 +0,0 @@-/**- * The chosen models of a service or account, as a short list (D625).- *- * Most people keep the models a service starts with, so the form shows what- * is chosen and leaves the two-pane picker one click away instead of opening- * on it. Rows reuse the picker's row classes so removing a model reads and- * behaves the same in both places.- */-import { useTranslation } from "react-i18next";-import { formatTokenCount, type ModelBinding } from "@pi-desktop/shared";-import { TooltipButton } from "../ui";-import { IconClose } from "../icons";-import type { ProviderModelsState } from "./useProviderModels";--export type ChosenModelsSummaryProps = {- models: ModelBinding[];- discoveryStatus: ProviderModelsState["status"];- busy?: boolean;- /** The list is exactly what the recommendation picked. */- autoPicked?: boolean;- onRemove: (id: string) => void;- onManage: () => void;- /** Open the picker on its hand-typed id field. */- onAddManually: () => void;-};--export function ChosenModelsSummary({- models,- discoveryStatus,- busy = false,- autoPicked = false,- onRemove,- onManage,- onAddManually,-}: ChosenModelsSummaryProps) {- const { t } = useTranslation();-- let empty: string;- if (discoveryStatus === "error") empty = t("settings.modelsSummaryFailed");- else if (discoveryStatus === "loading") empty = t("settings.modelsSummaryLoading");- else if (discoveryStatus === "ready") empty = t("settings.noModelsChosen");- else empty = t("settings.modelsEmptyHint");-- return (- <div className="provider-models-summary">- <div className="provider-models-summary-head">- <h4 className="provider-chosen-title">{t("settings.modelsSummaryTitle")}</h4>- <span className="provider-chosen-count">{models.length}</span>- <button- type="button"- className="provider-models-summary-manage"- disabled={busy}- aria-expanded={false}- onClick={onManage}- >- {t("settings.manageModels")}- </button>- </div>-- {models.length === 0 ? (- <div className="provider-chosen-empty">- <span>{empty}</span>- {discoveryStatus === "error" || discoveryStatus === "ready" ? (- <button- type="button"- className="provider-models-summary-action"- disabled={busy}- onClick={onAddManually}- >- {t("settings.addModelManually")}- </button>- ) : null}- </div>- ) : (- <ul className="provider-chosen-list">- {models.map((binding) => (- <li className="provider-chosen-row" key={binding.id}>- <div className="provider-chosen-row-head">- <span className="provider-chosen-row-id font-mono selectable">{binding.id}</span>- {binding.alias?.trim() ? (- <span className="provider-chosen-row-alias">{binding.alias.trim()}</span>- ) : null}- {binding.thinkingLevels.length > 0 ? (- <span className="provider-chosen-row-alias">{t("settings.modelReasoningTag")}</span>- ) : null}- <span className="provider-chosen-row-limits">- {formatTokenCount(binding.contextWindow)} · {formatTokenCount(binding.maxTokens)}- </span>- <TooltipButton- type="button"- className="provider-chosen-remove"- ariaLabel={t("settings.removeModel")}- tooltip={t("settings.removeModel")}- disabled={busy}- onClick={() => onRemove(binding.id)}- >- <IconClose size={12} />- </TooltipButton>- </div>- </li>- ))}- </ul>- )}-- {autoPicked && models.length > 0 ? (- <div className="provider-models-summary-hint">{t("settings.modelsAutoPicked")}</div>- ) : null}- </div>- );-}diff --git a/apps/desktop/src/components/settings/ModelSelectionPanes.tsx b/apps/desktop/src/components/settings/ModelSelectionPanes.tsxindex 7bff35272..46aba2908 100644--- a/apps/desktop/src/components/settings/ModelSelectionPanes.tsx+++ b/apps/desktop/src/components/settings/ModelSelectionPanes.tsx@@ -211,8 +211,8 @@ export type ModelSelectionPanesProps = {lookupContext?: CustomModelLookupContext;/** Attached to the hand-typed id field, so a caller can focus it. */customModelInputRef?: Ref<HTMLInputElement>;- /** Folds the picker back into the chosen-models summary (D625). */- onCollapse?: () => void;+ /** The chosen list is exactly what the recommendation picked. */+ autoPicked?: boolean;};/**@@ -231,7 +231,7 @@ export function ModelSelectionPanes({lookupContext,onImageModelChange,customModelInputRef,- onCollapse,+ autoPicked = false,}: ModelSelectionPanesProps) {const { t } = useTranslation();const { rows, models, publishedLevelsById, setModels } = selection;@@ -561,17 +561,10 @@ export function ModelSelectionPanes({onChange={(event) => setChosenQuery(event.target.value)}/></div>- {onCollapse ? (- <button- type="button"- className="provider-models-summary-manage"- aria-expanded- onClick={onCollapse}- >- {t("settings.collapseModels")}- </button>- ) : null}</div>+ {autoPicked && models.length > 0 ? (+ <div className="provider-models-summary-hint">{t("settings.modelsAutoPicked")}</div>+ ) : null}{models.length === 0 ? (<div className="provider-chosen-empty">{t("settings.noModelsChosen")}</div>) : visibleChosen.length === 0 ? (diff --git a/apps/desktop/src/components/settings/ProviderSetupDialog.tsx b/apps/desktop/src/components/settings/ProviderSetupDialog.tsxindex 4cc859f41..7d3081037 100644--- a/apps/desktop/src/components/settings/ProviderSetupDialog.tsx+++ b/apps/desktop/src/components/settings/ProviderSetupDialog.tsx@@ -4,8 +4,9 @@* A new service opens on the service chooser; picking a tile moves to the* form. Named services: paste a key and the recommended models are chosen as* soon as the service answers. Custom: name, URL, key and API format on the- * common path. Models come from the service endpoint; the full picker stays- * one click away behind the chosen-models summary.+ * common path. The service's own list is on the left and the models this+ * credential will run on the right, both visible from the first paint: a+ * recommended model is a starting point, never the only thing on screen.*/import { useEffect, useRef, useState } from "react";import { useTranslation } from "react-i18next";@@ -24,7 +25,6 @@ import { Button, Field, HelpIcon, Input, portalOverlay } from "../ui";import { ProviderHeadersEditor } from "./ProviderHeadersEditor";import { useProviderModels } from "./useProviderModels";import { ModelSelectionPanes, useModelSelection } from "./ModelSelectionPanes";-import { ChosenModelsSummary } from "./ChosenModelsSummary";import { ConnectionStatus, ProviderConnectionFields } from "./ProviderConnectionFields";import { ServiceChooser } from "./ServiceChooser";import { CUSTOM_SERVICE } from "./service-catalog";@@ -105,8 +105,6 @@ export function ProviderSetupDialog({// A format the user picked by hand outranks every inference about this row.const [apiStyleTouched, setApiStyleTouched] = useState(false);const [choosing, setChoosing] = useState(false);- const [managing, setManaging] = useState(false);- const customModelRef = useRef<HTMLInputElement>(null);const chooserOpen = choosing || !service;const namedPreset = NAMED_ENDPOINT_PRESETS.find((preset) => preset.id === service);@@ -184,14 +182,6 @@ export function ProviderSetupDialog({setBaseUrl((current) => (endpointsEqual(current, adoptedFrom) ? discoveredBaseUrl : current));}, [named, discoveredBaseUrl, adoptedFrom]);--- // A list with nothing to recommend leaves the choice to the user, so the- // picker opens instead of an empty summary.- useEffect(() => {- if (recommended.noRecommendation) setManaging(true);- }, [recommended.noRecommendation]);-useEffect(() => {const onKeyDown = (event: KeyboardEvent) => {if (event.key !== "Escape" || saving) return;@@ -251,11 +241,6 @@ export function ProviderSetupDialog({onServiceChange(next);};- const addModelManually = () => {- setManaging(true);- window.setTimeout(() => customModelRef.current?.focus(), 0);- };-const commitBaseUrl = () => {setBaseUrlTouched(true);const normalized = normalizeBaseUrlInput(baseUrl, resolvedApiStyle);@@ -476,37 +461,22 @@ export function ProviderSetupDialog({) : null}</div>- {managing ? (- <ModelSelectionPanes- discovery={discovery}- selection={selection}- listTitle={t("settings.serviceModels")}- busy={saving}- onReload={discovery.reload}- apiStyle={resolvedApiStyle}- imageModelIds={imageModelDraft ?? imageModelIds}- onImageModelChange={updateImageModelDraft}- customModelInputRef={customModelRef}- onCollapse={() => setManaging(false)}- lookupContext={{- baseUrl: requestBaseUrl,- vendorKey: namedPreset?.vendorKey ?? provider?.vendorKey ?? "custom",- providerId: provider?.id,- }}- />- ) : (- <ChosenModelsSummary- models={models}- discoveryStatus={discoveryActive ? discovery.status : "idle"}- busy={saving}- autoPicked={recommended.autoPicked}- onRemove={(id) =>- selection.setModels((current) => current.filter((entry) => entry.id !== id))- }- onManage={() => setManaging(true)}- onAddManually={addModelManually}- />- )}+ <ModelSelectionPanes+ discovery={discovery}+ selection={selection}+ listTitle={t("settings.serviceModels")}+ busy={saving}+ onReload={discovery.reload}+ apiStyle={resolvedApiStyle}+ imageModelIds={imageModelDraft ?? imageModelIds}+ onImageModelChange={updateImageModelDraft}+ lookupContext={{+ baseUrl: requestBaseUrl,+ vendorKey: namedPreset?.vendorKey ?? provider?.vendorKey ?? "custom",+ providerId: provider?.id,+ }}+ autoPicked={recommended.autoPicked}+ /></div></>);diff --git a/apps/desktop/src/components/settings/VendorAccountDialog.tsx b/apps/desktop/src/components/settings/VendorAccountDialog.tsxindex ec89594d2..12d5140c1 100644--- a/apps/desktop/src/components/settings/VendorAccountDialog.tsx+++ b/apps/desktop/src/components/settings/VendorAccountDialog.tsx@@ -6,10 +6,10 @@* entitlements, so this dialog shows what the account can actually run rather* than every model the vendor publishes. Choosing among those rows is* `ModelSelectionPanes`, the same picker the AI service dialog renders, so an- * account is not a reduced version of a service. Like a service, the dialog- * opens on the chosen-models summary and the picker is one click away (D625).+ * account is not a reduced version of a service: the account's own list and the+ * models it may run are both on screen from the first paint (D625).*/-import { useEffect, useRef, useState } from "react";+import { useEffect, useState } from "react";import {bindingForCustomModel,type ModelBinding,@@ -21,7 +21,6 @@ import { Button, Field, Input, portalOverlay } from "../ui";import { ProviderHeadersEditor } from "./ProviderHeadersEditor";import { useProviderModels } from "./useProviderModels";import { ModelSelectionPanes, useModelSelection } from "./ModelSelectionPanes";-import { ChosenModelsSummary } from "./ChosenModelsSummary";export type VendorAccountForm = {name: string;@@ -48,8 +47,6 @@ export function VendorAccountDialog({const [name, setName] = useState(initialName);const [headerPairs, setHeaderPairs] = useState(() => recordToPairs(provider.headers));const [advancedOpen, setAdvancedOpen] = useState(false);- const [managing, setManaging] = useState(false);- const customModelRef = useRef<HTMLInputElement>(null);const [models, setModels] = useState<ModelBinding[]>(provider.models.length > 0? provider.models@@ -136,37 +133,19 @@ export function VendorAccountDialog({/></Field>- {managing ? (- <ModelSelectionPanes- discovery={discovery}- selection={selection}- listTitle={t("settings.accountModels")}- busy={saving}- onReload={discovery.reload}- lookupContext={{- baseUrl: provider.baseUrl,- vendorKey: provider.vendorKey,- providerId: provider.id,- }}- apiStyle={provider.apiStyle ?? ""}- customModelInputRef={customModelRef}- onCollapse={() => setManaging(false)}- />- ) : (- <ChosenModelsSummary- models={models}- discoveryStatus={discovery.status}- busy={saving}- onRemove={(id) =>- selection.setModels((current) => current.filter((entry) => entry.id !== id))- }- onManage={() => setManaging(true)}- onAddManually={() => {- setManaging(true);- window.setTimeout(() => customModelRef.current?.focus(), 0);- }}- />- )}+ <ModelSelectionPanes+ discovery={discovery}+ selection={selection}+ listTitle={t("settings.accountModels")}+ busy={saving}+ onReload={discovery.reload}+ lookupContext={{+ baseUrl: provider.baseUrl,+ vendorKey: provider.vendorKey,+ providerId: provider.id,+ }}+ apiStyle={provider.apiStyle ?? ""}+ /></div><div className="vendor-account-actions">diff --git a/apps/desktop/src/features/chat/composer/ComposerModelList.tsx b/apps/desktop/src/features/chat/composer/ComposerModelList.tsxindex 8e168d76c..001e18113 100644--- a/apps/desktop/src/features/chat/composer/ComposerModelList.tsx+++ b/apps/desktop/src/features/chat/composer/ComposerModelList.tsx@@ -1,8 +1,13 @@import { formatTokenCount, type ModelInfo, type ProviderPublic } from "@pi-desktop/shared";import type { TFunction } from "i18next";import type { RefObject } from "react";-import { IconCheck, IconSearch } from "../../../components/icons";-import { composerModelBadges, composerModelDisplayName, sameComposerModelId } from "../../../lib/composer-models";+import { IconCheck, IconEye, IconSearch, IconSparkles } from "../../../components/icons";+import {+ composerModelBadges,+ composerModelBinding,+ composerModelDisplayName,+ sameComposerModelId,+} from "../../../lib/composer-models";export type ComposerModelGroup = {provider: ProviderPublic;@@ -61,6 +66,10 @@ export function ComposerModelList({selectedProviderId === group.provider.id &&sameComposerModelId(selectedModelId ?? "", model.modelId);const optionTitle = model.modelId;+ const alias = composerModelBinding(+ group.provider,+ model.modelId,+ )?.alias?.trim();const optionDisplayName = composerModelDisplayName(group.provider,model.modelId,@@ -79,20 +88,41 @@ export function ComposerModelList({onClick={() => void selectModel(group.provider, model.modelId)}><span className="composer-model-option-main">- <span className="composer-model-full-id">{optionTitle}</span>- {optionDisplayName !== optionTitle ? (- <span className="composer-model-display-name">{optionDisplayName}</span>- ) : null}+ {/*+ One label per row, never both: the name the user+ set wins over the catalog's, and an alias carries+ its own tone so which one is on screen stays+ visible. The wire id remains the row's title, so+ identity is still one hover away.+ */}+ <span+ className={`composer-model-label ${alias ? "is-alias" : ""}`}+ >+ {alias || optionDisplayName}+ </span><span className="composer-model-option-meta">- {composerModelBadges(model, group.provider).map((badge) => (- <span- key={badge}- className="composer-model-option-badge"- title={t(badge === "reasoning" ? "chat.modelBadgeReasoning" : "chat.modelBadgeVision")}- >- {t(badge === "reasoning" ? "chat.modelBadgeReasoning" : "chat.modelBadgeVision")}- </span>- ))}+ {composerModelBadges(model, group.provider).map((badge) => {+ const badgeLabel = t(+ badge === "reasoning"+ ? "chat.modelBadgeReasoning"+ : "chat.modelBadgeVision",+ );+ return (+ <span+ key={badge}+ className="composer-model-option-badge"+ title={badgeLabel}+ aria-label={badgeLabel}+ role="img"+ >+ {badge === "reasoning" ? (+ <IconSparkles size={12} aria-hidden="true" />+ ) : (+ <IconEye size={12} aria-hidden="true" />+ )}+ </span>+ );+ })}{model.contextWindow ? (<span className="composer-model-option-ctx">{formatTokenCount(model.contextWindow)}diff --git a/apps/desktop/src/features/chat/composer/ComposerModelPicker.tsx b/apps/desktop/src/features/chat/composer/ComposerModelPicker.tsxindex 504d41545..cfb33097b 100644--- a/apps/desktop/src/features/chat/composer/ComposerModelPicker.tsx+++ b/apps/desktop/src/features/chat/composer/ComposerModelPicker.tsx@@ -4,11 +4,9 @@ import { ComposerModelList } from "./ComposerModelList";import { AnchoredMenu } from "../../../components/settings/AnchoredMenu";import {IconBot,- IconCheck,IconChevronDown,IconChevronLeft,IconChevronRight,- IconSparkles,} from "../../../components/icons";import { TooltipButton } from "../../../components/ui";import type { useComposerModelMenu } from "./hooks/useComposerModelMenu";@@ -50,18 +48,14 @@ export function ComposerModelPicker({setQuery,modelHighlight,setModelHighlight,- thinkingHighlight,- setThinkingHighlight,rootMenuRef,modelSearchRef,modelListRef,- thinkingListRef,modelGroups,thinkingMenuLevels,showView,selectModel,commitThinkingLevel,- selectThinkingLevel,onMenuKeyDown,} = controller;@@ -93,7 +87,6 @@ export function ComposerModelPicker({showView("root");setQuery("");setModelHighlight(-1);- setThinkingHighlight(-1);}setOpen((current) => !current);}}@@ -127,21 +120,8 @@ export function ComposerModelPicker({<span className="composer-menu-entry-value" title={modelLabel}>{modelLabel}</span><IconChevronRight size={14} aria-hidden="true" /></button>- <button- type="button"- className="composer-menu-entry"- role="menuitem"- aria-haspopup="menu"- onClick={() => showView("thinking")}- >- <IconSparkles size={14} aria-hidden="true" />- <span className="composer-menu-entry-label">{t("chat.reasoningLevel")}</span>- <span className="composer-menu-entry-value">{thinkingLabel}</span>- <IconChevronRight size={14} aria-hidden="true" />- </button>- {/* The slider sits directly under the Reasoning level entry- (issue #417): one drag adjusts the level without entering the- submenu, while the entry itself opens the classic radio list. */}+ {/* The level is one drag away on the slider below (issue #417): the+ menu has no separate reasoning view left to open. */}{thinkingMenuLevels.length > 1 ? (<ThinkingLevelSliderkey={`${selectedProviderId}:${selectedModelId}:${thinkingMenuLevels.join("|")}`}@@ -161,43 +141,16 @@ export function ComposerModelPicker({onClick={() => showView("root")}><IconChevronLeft size={14} aria-hidden="true" />- <span>{view === "model" ? t("chat.model") : t("chat.reasoningLevel")}</span>+ <span>{t("chat.model")}</span></button><div className="composer-menu-separator" />- {view === "model" ? (- <>- <ComposerModelList- t={t} query={query} setQuery={setQuery}- modelSearchRef={modelSearchRef} modelListRef={modelListRef}- modelGroups={modelGroups} modelHighlight={modelHighlight}- setModelHighlight={setModelHighlight} selectModel={selectModel}- selectedProviderId={selectedProviderId} selectedModelId={selectedModelId}- />- </>- ) : (- <>- <div className="composer-thinking-heading">- {t("chat.reasoningSupportedBy", { model: modelLabel })}- </div>- <div className="composer-thinking-list" ref={thinkingListRef}>- {thinkingMenuLevels.map((level, index) => (- <button- key={level}- type="button"- data-thinking-index={index}- className={`composer-plus-item ${thinkingLevel === level ? "active" : ""} ${thinkingHighlight === index ? "kb-active" : ""}`}- role="menuitemradio"- aria-checked={thinkingLevel === level}- onMouseMove={() => setThinkingHighlight(index)}- onClick={() => void selectThinkingLevel(level)}- >- <span className="flex-1">{level}</span>- {thinkingLevel === level ? <IconCheck size={14} className="composer-model-check" aria-hidden="true" /> : null}- </button>- ))}- </div>- </>- )}+ <ComposerModelList+ t={t} query={query} setQuery={setQuery}+ modelSearchRef={modelSearchRef} modelListRef={modelListRef}+ modelGroups={modelGroups} modelHighlight={modelHighlight}+ setModelHighlight={setModelHighlight} selectModel={selectModel}+ selectedProviderId={selectedProviderId} selectedModelId={selectedModelId}+ /></>)}</AnchoredMenu>diff --git a/apps/desktop/src/features/chat/composer/hooks/useComposerModelMenu.ts b/apps/desktop/src/features/chat/composer/hooks/useComposerModelMenu.tsindex fd1ba2f6f..d3095179d 100644--- a/apps/desktop/src/features/chat/composer/hooks/useComposerModelMenu.ts+++ b/apps/desktop/src/features/chat/composer/hooks/useComposerModelMenu.ts@@ -66,11 +66,9 @@ export function useComposerModelMenu({const [view, setView] = useState<ComposerMenuView>("root");const [query, setQuery] = useState("");const [modelHighlight, setModelHighlight] = useState(-1);- const [thinkingHighlight, setThinkingHighlight] = useState(-1);const rootMenuRef = useRef<HTMLDivElement>(null);const modelSearchRef = useRef<HTMLInputElement>(null);const modelListRef = useRef<HTMLDivElement>(null);- const thinkingListRef = useRef<HTMLDivElement>(null);const thinkingConfigRef = useRef({mode,providerId: provider?.id,@@ -187,13 +185,6 @@ export function useComposerModelMenu({setModelHighlight(queryNeedle ? (flatModels.length ? 0 : -1) : activeFlatIndex);}, [activeFlatIndex, flatModels.length, flatModelsKey, open, queryNeedle, view]);- useEffect(() => {- if (!open || view !== "thinking") return;- setThinkingHighlight(- thinkingLevel ? thinkingMenuLevels.indexOf(thinkingLevel) : -1,- );- }, [open, thinkingLevel, thinkingMenuLevels, view]);-useEffect(() => {if (!open) return;for (const candidate of providers) {@@ -208,7 +199,6 @@ export function useComposerModelMenu({setView("root");setQuery("");setModelHighlight(-1);- setThinkingHighlight(-1);}, [open]);useEffect(() => {thinkingQueueRef.current?.invalidate();@@ -225,17 +215,11 @@ export function useComposerModelMenu({requestAnimationFrame(() => {if (view === "root") rootMenuRef.current?.querySelector<HTMLButtonElement>(".composer-menu-entry")?.focus();if (view === "model") modelSearchRef.current?.focus();- if (view === "thinking") thinkingListRef.current?.querySelector<HTMLButtonElement>("button")?.focus();if (view === "model" && modelHighlight >= 0) {modelListRef.current?.querySelector(`[data-model-index="${modelHighlight}"]`)?.scrollIntoView({ block: "nearest" });}- if (view === "thinking" && thinkingHighlight >= 0) {- thinkingListRef.current- ?.querySelector(`[data-thinking-index="${thinkingHighlight}"]`)- ?.scrollIntoView({ block: "nearest" });- }});}, [open, view]);@@ -246,17 +230,9 @@ export function useComposerModelMenu({?.scrollIntoView({ block: "nearest" });}, [modelHighlight, open, view]);- useEffect(() => {- if (!open || view !== "thinking" || thinkingHighlight < 0) return;- thinkingListRef.current- ?.querySelector(`[data-thinking-index="${thinkingHighlight}"]`)- ?.scrollIntoView({ block: "nearest" });- }, [open, thinkingHighlight, view]);-const showView = (nextView: ComposerMenuView) => {setView(nextView);setModelHighlight(-1);- setThinkingHighlight(-1);if (nextView !== "model") setQuery("");};@@ -295,7 +271,6 @@ export function useComposerModelMenu({setQuery("");setView("root");setModelHighlight(-1);- setThinkingHighlight(-1);} catch (error) {showToast(error instanceof Error ? error.message : String(error), {variant: "error",@@ -315,13 +290,6 @@ export function useComposerModelMenu({return queue.commit(level);};- const selectThinkingLevel = async (level: SessionThinkingLevel) => {- if (!(await commitThinkingLevel(level))) return;- setView("root");- setModelHighlight(-1);- setThinkingHighlight(-1);- };-const onMenuKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {if (event.nativeEvent.isComposing || event.nativeEvent.keyCode === 229) return;if (event.key === "Escape") {@@ -342,31 +310,15 @@ export function useComposerModelMenu({void selectModel(entry.provider, entry.model.modelId);}}- if (event.key === "Enter" && view === "thinking") {- const level = thinkingMenuLevels[thinkingHighlight] ?? thinkingMenuLevels[0];- if (level) {- event.preventDefault();- void selectThinkingLevel(level);- }- }return;}if (view === "root") return;event.preventDefault();- if (view === "model") {- if (!flatModels.length) return;- const delta = event.key === "ArrowDown" ? 1 : -1;- setModelHighlight((current) => {- const base = current < 0 ? (delta > 0 ? -1 : flatModels.length) : current;- return (base + delta + flatModels.length) % flatModels.length;- });- return;- }- if (!thinkingMenuLevels.length) return;+ if (!flatModels.length) return;const delta = event.key === "ArrowDown" ? 1 : -1;- setThinkingHighlight((current) => {- const base = current < 0 ? (delta > 0 ? -1 : thinkingMenuLevels.length) : current;- return (base + delta + thinkingMenuLevels.length) % thinkingMenuLevels.length;+ setModelHighlight((current) => {+ const base = current < 0 ? (delta > 0 ? -1 : flatModels.length) : current;+ return (base + delta + flatModels.length) % flatModels.length;});};@@ -378,19 +330,15 @@ export function useComposerModelMenu({setQuery,modelHighlight,setModelHighlight,- thinkingHighlight,- setThinkingHighlight,rootMenuRef,modelSearchRef,modelListRef,- thinkingListRef,modelGroups: filteredModelGroups,flatModels,thinkingMenuLevels,showView,selectModel,commitThinkingLevel,- selectThinkingLevel,onMenuKeyDown,controlsBlocked,};diff --git a/apps/desktop/src/features/chat/composer/model.ts b/apps/desktop/src/features/chat/composer/model.tsindex a6cc26257..718110e4d 100644--- a/apps/desktop/src/features/chat/composer/model.ts+++ b/apps/desktop/src/features/chat/composer/model.ts@@ -65,7 +65,7 @@ export type ComposerFileReference = {token?: string;};-export type ComposerMenuView = "root" | "model" | "thinking";+export type ComposerMenuView = "root" | "model";export type PromptEnhancementError = {message: string;diff --git a/apps/desktop/src/styles/composer-menus.css b/apps/desktop/src/styles/composer-menus.cssindex 203ed2a8d..f7a1c507e 100644--- a/apps/desktop/src/styles/composer-menus.css+++ b/apps/desktop/src/styles/composer-menus.css@@ -103,6 +103,10 @@.composer-model-thinking-menu {z-index: 60;+ /*+ One label per row plus two capability icons: wide enough for that and no+ wider, so the panel stays a menu rather than a second window.+ */width: min(280px, calc(100vw - 24px));}@@ -243,22 +247,8 @@padding: 5px 8px;}-.composer-thinking-heading {- padding: 3px 8px 5px;- color: var(--ds-text-muted);- font-size: var(--text-xs-plus);- line-height: var(--leading-compact);-}--.composer-thinking-list {- display: flex;- max-height: 280px;- flex-direction: column;- overflow-y: auto;-}--/* Reasoning slider (issue #417): the menu root carries the slider directly- under the Reasoning level entry; the entry opens the classic radio list.+/* Reasoning slider (issue #417): the menu root carries the slider itself, so a+ level is one drag instead of opening a list of levels.Stop/label alignment contract: the rail and the labels are full-widthn-column grids, so dot i, label i and the thumb at index i all sit on the@@ -542,44 +532,67 @@font-weight: var(--font-weight-normal);}-/* The full wire id is the identity. Wrap long route names instead of hiding- the part that distinguishes two configured models. */+/*+ The full wire id is the identity, and it stays whole: a long route name wraps+ instead of hiding the part that distinguishes two configured models. The id,+ its friendly name and the badges share one line — id first, name next, badges+ on the trailing edge — because the stacked column that preceded it pushed+ every row's content into the left half of the menu and left the rest empty.+*/.composer-model-option-main {display: flex;min-width: 0;flex: 1;- flex-direction: column;- align-items: flex-start;- gap: 2px;+ flex-direction: row;+ flex-wrap: wrap;+ align-items: baseline;+ gap: 2px 8px;}-.composer-model-full-id {+/*+ One label, never the wire id and a name together: the user's alias when the+ binding carries one, the catalog's name otherwise. Which of the two is on+ screen is visible in the label's own shape, and a long name wraps instead of+ hiding the part that distinguishes two configured models. The wire id stays+ the row's title.+*/+.composer-model-label {+ min-width: 0;+ flex: 0 1 auto;max-width: 100%;+ color: var(--ds-text-primary);overflow-wrap: anywhere;white-space: normal;}-.composer-model-display-name {- max-width: 100%;- color: var(--ds-text-faint);- font-size: var(--text-xs);- overflow-wrap: anywhere;++/* A name the user set is a label of its own, and reads as one: the catalog name+ stays plain text while an alias carries its own chip. Colour cannot tell the+ two apart here — the app's accent is the text colour itself — so the shape+ carries the meaning. */+.composer-model-label.is-alias {+ padding: 1px 6px;+ border-radius: var(--radius-full);+ background: var(--ds-tile-deep);}.composer-model-option-meta {display: flex;flex: 0 0 auto;+ /* Pinned to the row's trailing edge: the capability icons and the window are+ what a row shows on the right. */+ margin-left: auto;align-items: center;gap: 4px;}+/* Capability markers are icons, not words: a row carries up to two of them, and+ the spelled-out labels were the widest thing in it. The accessible name stays+ the translated label, so nothing is lost to a screen reader. */.composer-model-option-badge {- border-radius: var(--radius-3xs);- background: var(--ds-tile-deep);- padding: 0 4px;+ display: inline-flex;+ flex: 0 0 auto;+ align-items: center;color: var(--ds-text-faint);- font-size: var(--text-2xs);- line-height: var(--leading-relaxed);- text-transform: lowercase;}.composer-model-option-ctx {@@ -588,12 +601,6 @@font-variant-numeric: tabular-nums;}-.composer-thinking-list .composer-plus-item > span {- overflow: hidden;- text-overflow: ellipsis;- white-space: nowrap;-}-.composer-plus-item.active {background: var(--ds-bg-active);border-radius: var(--radius-sm);diff --git a/apps/desktop/src/styles/model-config.css b/apps/desktop/src/styles/model-config.cssindex 0b5ee6159..e5c51e9fb 100644--- a/apps/desktop/src/styles/model-config.css+++ b/apps/desktop/src/styles/model-config.css@@ -211,8 +211,6 @@}.provider-service-chip-change,-.provider-models-summary-manage,-.provider-models-summary-action,.service-chooser-empty-action {flex: none;margin: 0;@@ -228,24 +226,18 @@}.provider-service-chip-change:hover:not(:disabled),-.provider-models-summary-manage:hover:not(:disabled),-.provider-models-summary-action:hover:not(:disabled),.service-chooser-empty-action:hover:not(:disabled) {background: var(--ds-bg-hover);color: var(--ds-text-primary);}.provider-service-chip-change:focus-visible,-.provider-models-summary-manage:focus-visible,-.provider-models-summary-action:focus-visible,.service-chooser-empty-action:focus-visible {outline: none;box-shadow: 0 0 0 2px color-mix(in oklab, var(--ds-accent) 24%, transparent);}-.provider-service-chip-change:disabled,-.provider-models-summary-manage:disabled,-.provider-models-summary-action:disabled {+.provider-service-chip-change:disabled {cursor: default;color: var(--ds-text-faint);}diff --git a/apps/desktop/src/styles/service-setup.css b/apps/desktop/src/styles/service-setup.cssindex 382a1f37f..256c47585 100644--- a/apps/desktop/src/styles/service-setup.css+++ b/apps/desktop/src/styles/service-setup.css@@ -157,45 +157,7 @@text-align: center;}-/* ------------------------------------------------ chosen models summary */--/* The same inset tray as the picker panes, so folding one into the other- keeps the dialog's shape. */-.provider-models-summary {- flex: 1;- display: flex;- flex-direction: column;- min-height: 0;- border-radius: var(--radius-sm);- background: var(--ds-bg-inset);-}--.provider-models-summary-head {- display: flex;- align-items: center;- gap: 6px;- flex: none;- padding: 9px 8px 4px;-}--.provider-models-summary-head .provider-models-summary-manage,-.provider-chosen-head .provider-models-summary-manage {- margin-left: auto;-}--.provider-chosen-search-wrap + .provider-models-summary-manage {- margin-left: 0;-}--.provider-models-summary .provider-chosen-row-head {- min-height: 30px;-}--.provider-models-summary .provider-chosen-empty {- flex-direction: column;- gap: 10px;-}-+/* ------------------------------------------- recommended-model hint */.provider-models-summary-hint {flex: none;padding: 4px 10px 9px;diff --git a/apps/desktop/test/composer-model-thinking-menu.test.mjs b/apps/desktop/test/composer-model-thinking-menu.test.mjsindex 9137d46d4..53d96fa0a 100644--- a/apps/desktop/test/composer-model-thinking-menu.test.mjs+++ b/apps/desktop/test/composer-model-thinking-menu.test.mjs@@ -13,10 +13,11 @@ const listSource = await readComposerModule("ComposerModelList.tsx");const composerSource = `${modelMenuSource}\n${pickerSource}\n${sliderSource}\n${listSource}`;const stylesSource = await loadStyles();-test("Composer uses one model × reasoning popover with a root and in-place submenus", () => {+test("Composer uses one model popover with a root and one in-place submenu", () => {assert.match(composerSource, /useState<ComposerMenuView>\("root"\)/);assert.match(composerSource, /showView\("model"\)/);- assert.match(composerSource, /showView\("thinking"\)/);+ // The reasoning level is the slider itself: no second submenu to enter.+ assert.doesNotMatch(composerSource, /showView\("thinking"\)/);assert.match(composerSource, /menuClassName="composer-model-menu composer-model-thinking-menu"/);assert.match(composerSource, /role="menuitem"[\s\S]*?aria-haspopup="menu"/);assert.match(composerSource, /className="composer-menu-back"/);@@ -25,26 +26,27 @@ test("Composer uses one model × reasoning popover with a root and in-place submassert.doesNotMatch(composerSource, /className={`icon-btn mode-chip thinking-chip/);});-test("model and reasoning selection return to the root without closing", () => {+test("model selection returns to the root without closing", () => {assert.match(composerSource, /await configureActiveSession\(\{[\s\S]*?thinkingLevel: nextThinkingLevel/);assert.match(composerSource, /setQuery\(""\);[\s\S]*?setView\("root"\)/);- assert.match(composerSource, /const selectThinkingLevel = async/);- assert.match(composerSource, /setView\("root"\);[\s\S]*?setThinkingHighlight\(-1\)/);assert.match(composerSource, /const thinkingMenuLevels = sessionThinkingMenuLevels\(availableThinkingLevels\)/);});-test("the menu root carries the reasoning slider under the reasoning entry", () => {- // The root view renders the slider directly beneath the Reasoning level- // entry; the entry itself still opens the classic radio-list submenu.- assert.match(composerSource, /onClick=\{\(\) => showView\("thinking"\)\}[\s\S]*?className="composer-thinking-slider"/);+test("the menu root carries the reasoning slider itself", () => {+ // The root view renders the slider and nothing else for the level: there is+ // no reasoning entry left to open a list of levels.assert.match(composerSource, /\{thinkingMenuLevels\.length > 1 \? \(/);assert.match(composerSource, /className="composer-thinking-slider"/);+ assert.doesNotMatch(composerSource, /showView\("thinking"\)/);+ assert.doesNotMatch(composerSource, /composer-thinking-list/);assert.match(sliderSource, /"--stop-count": levels\.length/);assert.match(composerSource, /type="range"/);assert.match(composerSource, /className="composer-thinking-range"/);assert.match(sliderSource, /aria-label=\{label\}/);assert.match(sliderSource, /aria-valuetext=\{levels\[index\] \?\? level\}/);assert.match(composerSource, /const commitThinkingLevel = /);- assert.match(composerSource, /if \(!\(await commitThinkingLevel\(level\)\)\) return;/);+ // The slider is the only path that writes a level, and its write is+ // latest-wins: the queue owns the ordering.+ assert.match(composerSource, /return queue\.commit\(level\)/);assert.match(pickerSource, /commit=\{commitThinkingLevel\}/);assert.match(composerSource, /if \(SLIDER_KEYS\.has\(event\.key\)\) event\.stopPropagation\(\);/);assert.match(composerSource, /composer-thinking-tick/);@@ -97,7 +99,7 @@ test("the combined chip and menu meet the compact accessible visual contract", (assert.match(composerSource, /aria-expanded=\{open\}/);assert.match(composerSource, /role="menuitemradio"/);assert.match(composerSource, /aria-checked=\{active\}/);- assert.match(composerSource, /aria-checked=\{thinkingLevel === level\}/);+ assert.doesNotMatch(composerSource, /aria-checked=\{thinkingLevel === level\}/);assert.match(composerSource, /event\.key === "ArrowLeft"/);assert.match(composerSource, /event\.key === "Escape"/);assert.match(stylesSource, /\.composer-model-thinking-menu\s*\{[\s\S]*?position:\s*fixed;/);@@ -153,3 +155,47 @@ test("reasoning projection uses the selected exact catalog row and binding", asyassert.match(source, /sameComposerModelId\(candidate\.modelId, modelId\)/);assert.match(source, /sameComposerModelId\(candidate\.id, model\.modelId\)/);});++test("a model row spends the panel's width instead of stacking at its left edge", () => {+ // The label and the capability icons share one line, with the icons pinned to+ // the trailing edge: stacking them in a column left the right half of the+ // menu empty next to every row.+ assert.match(+ stylesSource,+ /\.composer-model-option-main\s*\{[^}]*flex-direction:\s*row;/,+ );+ assert.match(+ stylesSource,+ /\.composer-model-option-main\s*\{[^}]*flex-wrap:\s*wrap;/,+ );+ assert.match(+ stylesSource,+ /\.composer-model-option-meta\s*\{[^}]*margin-left:\s*auto;/,+ );+ // One label per row, and a long name wraps in full rather than truncating.+ assert.doesNotMatch(stylesSource, /\.composer-model-full-id/);+ assert.doesNotMatch(stylesSource, /\.composer-model-display-name/);+ assert.match(+ stylesSource,+ /\.composer-model-label\s*\{[^}]*overflow-wrap:\s*anywhere;[^}]*white-space:\s*normal;/,+ );+});++test("an alias is told apart from the catalog name, and capabilities are icons", () => {+ // A row shows one of the two names, never both: the alias the user set wins+ // over the catalog's, and it carries its own chip so which one is on screen+ // stays visible.+ assert.match(listSource, /\?\.alias\?\.trim\(\)/);+ assert.match(listSource, /\{alias \|\| optionDisplayName\}/);+ assert.match(listSource, /composer-model-label \$\{alias \? "is-alias" : ""\}/);+ assert.match(+ stylesSource,+ /\.composer-model-label\.is-alias\s*\{[^}]*background:\s*var\(--ds-tile-deep\);/,+ );+ // Capability markers are icons whose accessible name stays the translated+ // label, because the spelled-out badges were the widest thing in a row.+ assert.match(listSource, /IconSparkles size=\{12\}/);+ assert.match(listSource, /IconEye size=\{12\}/);+ assert.match(listSource, /chat\.modelBadgeReasoning/);+ assert.match(listSource, /chat\.modelBadgeVision/);+});diff --git a/apps/desktop/test/provider-form-layout.test.mjs b/apps/desktop/test/provider-form-layout.test.mjsindex 8314c1869..b7f7bdece 100644--- a/apps/desktop/test/provider-form-layout.test.mjs+++ b/apps/desktop/test/provider-form-layout.test.mjs@@ -22,7 +22,6 @@ const pickerSource = await read("../src/components/settings/ModelSelectionPanes.const fetchErrorSource = await read("../src/components/settings/ModelsFetchErrorMessage.tsx");// The credential rows live in their own component since D625.const fieldsSource = await read("../src/components/settings/ProviderConnectionFields.tsx");-const summarySource = await read("../src/components/settings/ChosenModelsSummary.tsx");const styles = await loadStyles();/** Declaration block for exactly one selector, so matches cannot span rules. */@@ -352,7 +351,8 @@ test("the vendor account dialog hosts the same panes in the same shell", () => {assert.match(dialog, /min-width: 0/);assert.match(dialog, /height: min\(720px, calc\(100vh - 64px\)\)/);assert.match(vendorDialogSource, /<ModelSelectionPanes/);- assert.match(vendorDialogSource, /<ChosenModelsSummary/);+ // Neither dialog folds the picker behind a chosen-models summary.+ assert.doesNotMatch(vendorDialogSource, /<ChosenModelsSummary/);// The duplicated chosen-pane and custom-model rules are retired with it.assert.doesNotMatch(styles, /\.vendor-account-chosen/);assert.doesNotMatch(styles, /\.vendor-account-custom-model/);@@ -377,22 +377,22 @@ test("Advanced says a fullwidth value folds and a non-Latin-1 value is refused",assert.match(block(".provider-setup-header-note"), /color: var\(--ds-text-muted\)/);});-test("models open as a summary with the full picker one click away (D625)", () => {+test("both dialogs open straight on the two panes, with no summary to fold (D625)", () => {for (const source of [setupSource, vendorDialogSource]) {- assert.match(source, /managing \?/);- assert.match(source, /<ChosenModelsSummary/);- assert.match(source, /onCollapse=\{\(\) => setManaging\(false\)\}/);- assert.match(source, /customModelInputRef=\{customModelRef\}/);+ assert.match(source, /<ModelSelectionPanes/);+ // The chosen-models summary and its Manage/Collapse pair are gone: the+ // service's own list and the models this credential runs are both on+ // screen from the first paint, so nothing has to be opened to see them.+ assert.doesNotMatch(source, /<ChosenModelsSummary/);+ assert.doesNotMatch(source, /setManaging/);+ assert.doesNotMatch(source, /settings\.manageModels/);+ assert.doesNotMatch(source, /settings\.collapseModels/);}- // Summary rows reuse the picker's row classes so both read the same.- assert.match(summarySource, /provider-chosen-row-id/);- assert.match(summarySource, /provider-chosen-remove/);- assert.match(summarySource, /settings\.manageModels/);- assert.match(summarySource, /settings\.addModelManually/);- assert.match(pickerSource, /settings\.collapseModels/);- // No model opens its advanced settings on its own any more.+ // The picker carries no fold-back control of its own either.+ assert.doesNotMatch(pickerSource, /onCollapse/);+ assert.doesNotMatch(pickerSource, /settings\.collapseModels/);+ // The recommendation says so where the picks are, and no model opens its+ // advanced settings on its own any more.+ assert.match(pickerSource, /settings\.modelsAutoPicked/);assert.match(pickerSource, /useState<string \| null>\(null\)/);- const summary = block(".provider-models-summary");- assert.match(summary, /background: var\(--ds-bg-inset\)/);- assert.doesNotMatch(summary, /border:|border-top|box-shadow/);});diff --git a/apps/desktop/test/provider-model-list-scope.test.mjs b/apps/desktop/test/provider-model-list-scope.test.mjsnew file mode 100644index 000000000..ef705b041--- /dev/null+++ b/apps/desktop/test/provider-model-list-scope.test.mjs@@ -0,0 +1,65 @@+/**+ * What the settings picker's catalog fallback lists.+ *+ * The picker renders what the credential can call, so when a service publishes+ * no model list of its own the catalog stands in for it: the vendor's published+ * set as a whole, chat models next to the embedding, speech and image endpoints+ * the same key can reach. Preselection stays chat-only (`recommendModels`), and+ * the session and agent paths keep asking for text models only, so the wider+ * list is a settings surface rather than a new default everywhere.+ */+import assert from "node:assert/strict";+import { register } from "node:module";+import test from "node:test";++register(new URL("./helpers/ts-import-hooks.mjs", import.meta.url));++const { ModelsDevCatalog } = await import("../electron/main/models-dev-catalog.ts");++const catalogPath = new URL("../resources/models.dev/api.json", import.meta.url).pathname;++async function loadedCatalog() {+ const catalog = new ModelsDevCatalog({ catalogPath });+ assert.equal(await catalog.ensureLoaded(), true);+ return catalog;+}++/** A model whose published modalities are text in and text out. */+const isTextModel = (model) =>+ model.modalities.input.includes("text") && model.modalities.output.includes("text");++test("the settings list can ask for every model a provider publishes", async () => {+ const catalog = await loadedCatalog();+ const input = { vendorKey: "openai", providerId: "row" };+ const textOnly = catalog.modelsForProvider(input);++ assert.ok(textOnly.length > 0, "the bundled snapshot publishes openai text models");+ assert.ok(textOnly.every(isTextModel), "the default list stays what a session can run");++ const all = catalog.modelsForProvider({ ...input, includeNonChat: true });+ // Nothing is dropped when the list widens: it is the same set plus the+ // endpoints a text-only filter hides.+ for (const model of textOnly) {+ assert.ok(+ all.some((entry) => entry.modelId === model.modelId),+ `${model.modelId} disappeared from the wider list`,+ );+ }+ assert.ok(all.length > textOnly.length, "some published model is not a text model");+ assert.ok(+ all.some((model) => !isTextModel(model)),+ "the extra rows are the non-text endpoints the picker has to show",+ );+});++test("the wider list keeps one record per id and stays attributed to the provider", async () => {+ const catalog = await loadedCatalog();+ const models = catalog.modelsForProvider({+ vendorKey: "openai",+ providerId: "row-wide",+ includeNonChat: true,+ });+ const ids = models.map((model) => model.modelId.toLowerCase());+ assert.equal(new Set(ids).size, ids.length, "an id is listed once");+ assert.ok(models.every((model) => model.providerId === "row-wide"));+});diff --git a/apps/desktop/test/service-chooser.test.mjs b/apps/desktop/test/service-chooser.test.mjsindex 3dd8da6a7..a62219c67 100644--- a/apps/desktop/test/service-chooser.test.mjs+++ b/apps/desktop/test/service-chooser.test.mjs@@ -84,7 +84,7 @@ test("chooser tiles are toned in-flow surfaces without strokes (D297)", () => {for (const selector of [".service-chooser-search",".service-chooser-empty",- ".provider-models-summary",+ ".provider-chosen",".provider-service-chip",]) {assert.doesNotMatch(rule(selector), /\bborder(-(top|right|bottom|left|color|width|style))?:/, selector);diff --git a/apps/desktop/test/settings-general.test.mjs b/apps/desktop/test/settings-general.test.mjsindex 70af1a94a..dfc3f513b 100644--- a/apps/desktop/test/settings-general.test.mjs+++ b/apps/desktop/test/settings-general.test.mjs@@ -326,7 +326,7 @@ test("model configuration lists AI services and vendor accounts together", () =>// Both credential kinds now pick from the same live, service-provided list.assert.match(vendorAccountDialogSource, /useProviderModels/);assert.match(vendorAccountDialogSource, /<ModelSelectionPanes/);- assert.match(vendorAccountDialogSource, /<ChosenModelsSummary/);+ assert.doesNotMatch(vendorAccountDialogSource, /<ChosenModelsSummary/);assert.match(vendorAccountDialogSource, /modelId: persisted\[0\]\.id/);assert.match(vendorAccountsHookSource, /providerIsReady/);assert.match(vendorAccountsHookSource, /defaultProviderId: next\?\.id \?\? ""/);diff --git a/apps/desktop/test/thinking-ui.test.mjs b/apps/desktop/test/thinking-ui.test.mjsindex 8617f708a..911f89eca 100644--- a/apps/desktop/test/thinking-ui.test.mjs+++ b/apps/desktop/test/thinking-ui.test.mjs@@ -68,12 +68,13 @@ test("composer exposes the runtime thinking level order and provider filtering",assert.match(composerSource, /supportsReasoning/);assert.match(composerSource, /thinkingLevelForProvider/);assert.match(composerSource, /thinkingLevel:\s*level/);- assert.match(composerSource, /composer-thinking-list/);+ // The level is a drag on the slider: no reasoning list submenu to render.+ assert.doesNotMatch(composerSource, /composer-thinking-list/);assert.doesNotMatch(stylesSource, /\.composer-thinking-levels/);assert.doesNotMatch(stylesSource, /\.composer-thinking-level\b/);assert.match(stylesSource,- /\.composer-model-thinking-menu\s*\{[\s\S]*?width:\s*min\(280px,\s*calc\(100vw - 24px\)\);/,+ /\.composer-model-thinking-menu\s*\{[\s\S]*?width:\s*min\(280px,\s*calc\(100vw - 24px\)\);/);assert.match(composerSource, /availableThinkingLevels/);assert.match(composerSource, /thinkingMenuLevels/);@@ -81,7 +82,8 @@ test("composer exposes the runtime thinking level order and provider filtering",test("thinking levels use their canonical English values without i18n", () => {assert.match(composerSource, /const thinkingLabel = thinkingLevel;/);- assert.match(composerSource, /<span className="flex-1">\s*\{level\}/);+ // The slider's ticks print the canonical level values themselves.+ assert.match(composerSource, /onClick=\{\(\) => select\(stop\)\}>\{candidate\}<\/button>/);assert.doesNotMatch(composerSource, /THINKING_LEVEL_(LABELS|I18N_KEYS)/);assert.doesNotMatch(composerSource, /chat\.effort(?:Off|Minimal|Low|Mid|High|Xhigh|Max)/);assert.doesNotMatch(transcriptSource, /thinkingLevel\./);diff --git a/docs/spec/08-meta/decisions-log.md b/docs/spec/08-meta/decisions-log.mdindex b9eee1224..2deebf421 100644--- a/docs/spec/08-meta/decisions-log.md+++ b/docs/spec/08-meta/decisions-log.md@@ -7126,3 +7126,32 @@ must keep splitting are covered by `markdown-blocks.test.mjs`.- Covered by the updated `apps/desktop/test/service-chooser.test.mjs` and the`scripts/e2e/provider-api-style.tsx` probe, which now asserts that the first`[data-service-id]` tile is `custom` rather than the last.++## 2026-09-25 — Model settings open on the two panes, and the fallback list is complete (D627)++- Editing a service or a vendor account used to land on a chosen-models summary+ (`ChosenModelsSummary`) with the real picker one click away, so reaching a+ per-model control cost two decisions before it cost any work. Both dialogs now+ render the two panes (`ModelSelectionPanes`) straight away — the service's own+ list on the left, the models this credential will run on the right — and the+ summary plus its Manage models / Collapse pair are gone, along with the+ `autoPicked` hint that only the summary could show. Preselection is unchanged+ (`recommended-models.ts`, `useRecommendedModelSelection`); the panel simply+ states it where the picks are. A recommended model is a starting point, never+ the only thing on screen.+- The catalog stand-in for a service that publishes no model list is now the+ provider's published set as a whole (`modelsForProvider({ includeNonChat: true })`+ from the settings handler), so embedding, speech, image and reranking+ endpoints a key can call appear next to the chat models instead of silently+ missing. The default stays text-only, because session and agent paths ask for+ what they can actually run, and automatic preselection still filters to+ tool-capable chat models.+- Covered by the updated `apps/desktop/test/provider-form-layout.test.mjs`+ (both dialogs render the panes with no summary to fold),+ `apps/desktop/test/settings-general.test.mjs`,+ `apps/desktop/test/service-chooser.test.mjs` and the new+ `apps/desktop/test/provider-model-list-scope.test.mjs` (the default list is+ text-only, `includeNonChat` adds the hidden endpoints without dropping or+ duplicating an id), plus the `scripts/e2e/provider-api-style.tsx` and+ `scripts/e2e/image-generation-ui.tsx` probes, which no longer click Manage+ models.diff --git a/docs/zh-CN/spec/08-meta/decisions-log.md b/docs/zh-CN/spec/08-meta/decisions-log.mdindex 18b192054..bc82d7919 100644--- a/docs/zh-CN/spec/08-meta/decisions-log.md+++ b/docs/zh-CN/spec/08-meta/decisions-log.md@@ -5042,3 +5042,25 @@ Markdown 源码,不是 `text/html` 负载;对禁用行内 HTML 的外部编- 覆盖:更新后的 `apps/desktop/test/service-chooser.test.mjs`,以及`scripts/e2e/provider-api-style.tsx` 探针——它现在断言第一个`[data-service-id]` 磁贴是 `custom`,而不是最后一个。++## 2026-09-25 —— 模型设置直接打开双栏,兜底列表给出全部模型(D627)++- 编辑一个服务或厂商账号时,之前先落在「已选模型摘要」(`ChosenModelsSummary`)上,+ 真正的选择器还要再点一次才出现,于是要动一个逐模型控件得先做两次决策。现在两个+ 对话框都直接渲染双栏(`ModelSelectionPanes`)——左边是该服务自己的列表,右边是+ 该凭据会运行的模型——摘要与「管理模型 / 收起」这对控件删除,只有摘要能显示的+ `autoPicked` 提示也随之取消。自动预选逻辑不变(`recommended-models.ts`、+ `useRecommendedModelSelection`),只是把这句话放在选中的模型旁边:推荐模型是+ 起点,而不是屏幕上唯一的东西。+- 服务自己没有模型列表时,目录兜底现在给出该厂商发布的整套模型+ (设置处理器以 `modelsForProvider({ includeNonChat: true })` 调用),因此这个 key+ 能调用的 embedding、语音、图像、重排端点会和聊天模型一起出现,而不是悄悄缺+ 席。默认行为仍是只要文本模型,因为会话与 agent 路径要的是它们真正能跑的模型;+ 自动预选也仍然只挑可调工具的聊天模型。+- 覆盖:更新后的 `apps/desktop/test/provider-form-layout.test.mjs`(两个对话框都直接+ 渲染双栏、没有可折叠的摘要)、`apps/desktop/test/settings-general.test.mjs`、+ `apps/desktop/test/service-chooser.test.mjs`,以及新增的+ `apps/desktop/test/provider-model-list-scope.test.mjs`(默认列表只有文本模型,+ `includeNonChat` 补上被隐藏的端点且不丢 id、不重复),另有+ `scripts/e2e/provider-api-style.tsx` 与 `scripts/e2e/image-generation-ui.tsx`+ 探针——它们不再点击「管理模型」。diff --git a/packages/i18n/src/locales/de/index.ts b/packages/i18n/src/locales/de/index.tsindex fe6c3a756..7cc77819e 100644--- a/packages/i18n/src/locales/de/index.ts+++ b/packages/i18n/src/locales/de/index.ts@@ -505,7 +505,6 @@ export const de = {"modelBadgeVision": "Vision","permissionMode": "Berechtigungsmodus","reasoningLevel": "Argumentationsebene",- "reasoningSupportedBy": "Aktuelles Modell {{model}} unterstützt diese Argumentationsebenen","permissionInherit": "Standard","permissionAsk": "Immer nachfragen","permissionAcceptEdits": "Änderungen akzeptieren",@@ -1308,12 +1307,6 @@ sklm: {"connectionNoModelList_other": "Dieser Dienst listet keine Modelle · {{count}} bekannte Modelle","changeService": "Ändern","changeServiceTitle": "Dienst ändern",- "modelsSummaryTitle": "Modelle",- "modelsSummaryLoading": "Modelle werden geladen…",- "modelsSummaryFailed": "Modelle konnten nicht geladen werden. Prüfen Sie die Verbindung oben oder fügen Sie ein Modell per ID hinzu.",- "manageModels": "Modelle verwalten",- "collapseModels": "Einklappen",- "addModelManually": "Modell manuell hinzufügen","modelReasoningTag": "Reasoning","modelsAutoPicked": "Aus den empfohlenen Modellen ausgewählt. Unter „Modelle verwalten“ anpassen.","presetOpenai": "OpenAI",@@ -1449,7 +1442,7 @@ sklm: {"maxOutput": "Maximale Ausgabe","supportedThinkingLevels": "Denkebenen","defaultThinkingLevel": "Standard-Denkebene",- "modelCapabilities": "Anhänge",+ "modelCapabilities": "Fähigkeiten","imageInput": "Bilder","documentInput": "PDF","thinkingManualOverrideHint": "Nicht im Katalog; aktivieren, wenn unterstützt.",diff --git a/packages/i18n/src/locales/en/index.ts b/packages/i18n/src/locales/en/index.tsindex 3b9475c20..a4956f41a 100644--- a/packages/i18n/src/locales/en/index.ts+++ b/packages/i18n/src/locales/en/index.ts@@ -512,7 +512,6 @@ export const en = {modelBadgeVision: "vision",permissionMode: "Permission mode",reasoningLevel: "Reasoning level",- reasoningSupportedBy: "Current model {{model}} supports these reasoning levels",permissionInherit: "Default",permissionAsk: "Ask every time",permissionAcceptEdits: "Accept edits",@@ -1323,12 +1322,6 @@ sklm: {connectionNoModelList_other: "This service doesn't list models · {{count}} known models",changeService: "Change",changeServiceTitle: "Change service",- modelsSummaryTitle: "Models",- modelsSummaryLoading: "Loading models…",- modelsSummaryFailed: "Couldn't load models. Check the connection above, or add a model by ID.",- manageModels: "Manage models",- collapseModels: "Collapse",- addModelManually: "Add a model manually",modelReasoningTag: "Reasoning",modelsAutoPicked: "Picked from the recommended models. Adjust them in Manage models.",presetOpenai: "OpenAI",@@ -1467,7 +1460,7 @@ sklm: {maxOutput: "Max output",supportedThinkingLevels: "Thinking levels",defaultThinkingLevel: "Default thinking level",- modelCapabilities: "Attachments",+ modelCapabilities: "Capabilities",imageInput: "Images",documentInput: "PDF",thinkingManualOverrideHint: "Not in catalog; enable if supported.",diff --git a/packages/i18n/src/locales/es/index.ts b/packages/i18n/src/locales/es/index.tsindex 3a33a41ab..2340e037e 100644--- a/packages/i18n/src/locales/es/index.ts+++ b/packages/i18n/src/locales/es/index.ts@@ -505,7 +505,6 @@ export const es = {"modelBadgeVision": "visión","permissionMode": "Modo de permiso","reasoningLevel": "Nivel de razonamiento",- "reasoningSupportedBy": "El modelo actual {{model}} admite estos niveles de razonamiento","permissionInherit": "Predeterminado","permissionAsk": "Preguntar siempre","permissionAcceptEdits": "Aceptar ediciones",@@ -1308,12 +1307,6 @@ sklm: {"connectionNoModelList_other": "Este servicio no lista modelos · {{count}} modelos conocidos","changeService": "Cambiar","changeServiceTitle": "Cambiar servicio",- "modelsSummaryTitle": "Modelos",- "modelsSummaryLoading": "Cargando modelos…",- "modelsSummaryFailed": "No se pudieron cargar los modelos. Revise la conexión de arriba o añada un modelo por su ID.",- "manageModels": "Gestionar modelos",- "collapseModels": "Contraer",- "addModelManually": "Añadir un modelo manualmente","modelReasoningTag": "Razonamiento","modelsAutoPicked": "Elegidos entre los modelos recomendados. Ajústelos en Gestionar modelos.","presetOpenai": "OpenAI",@@ -1449,7 +1442,7 @@ sklm: {"maxOutput": "Salida máxima","supportedThinkingLevels": "Niveles de pensamiento","defaultThinkingLevel": "Nivel de pensamiento predeterminado",- "modelCapabilities": "Archivos adjuntos",+ "modelCapabilities": "Capacidades","imageInput": "Imágenes","documentInput": "PDF","thinkingManualOverrideHint": "No en el catálogo; habilitar si es compatible.",diff --git a/packages/i18n/src/locales/fr/index.ts b/packages/i18n/src/locales/fr/index.tsindex 2b6a3efe0..f6ed92418 100644--- a/packages/i18n/src/locales/fr/index.ts+++ b/packages/i18n/src/locales/fr/index.ts@@ -505,7 +505,6 @@ export const fr = {"modelBadgeVision": "vision","permissionMode": "Mode d'autorisation","reasoningLevel": "Niveau de raisonnement",- "reasoningSupportedBy": "Le modèle actuel {{model}} prend en charge ces niveaux de raisonnement","permissionInherit": "Par défaut","permissionAsk": "Demander à chaque fois","permissionAcceptEdits": "Accepter les modifications",@@ -1308,12 +1307,6 @@ sklm: {"connectionNoModelList_other": "Ce service ne liste pas ses modèles · {{count}} modèles connus","changeService": "Modifier","changeServiceTitle": "Changer de service",- "modelsSummaryTitle": "Modèles",- "modelsSummaryLoading": "Chargement des modèles…",- "modelsSummaryFailed": "Impossible de charger les modèles. Vérifiez la connexion ci-dessus ou ajoutez un modèle par son ID.",- "manageModels": "Gérer les modèles",- "collapseModels": "Réduire",- "addModelManually": "Ajouter un modèle manuellement","modelReasoningTag": "Raisonnement","modelsAutoPicked": "Choisis parmi les modèles recommandés. Ajustez-les dans Gérer les modèles.","presetOpenai": "OpenAI",@@ -1449,7 +1442,7 @@ sklm: {"maxOutput": "Sortie maximale","supportedThinkingLevels": "Niveaux de réflexion","defaultThinkingLevel": "Niveau de réflexion par défaut",- "modelCapabilities": "Pièces jointes",+ "modelCapabilities": "Capacités","imageInput": "Images","documentInput": "PDF","thinkingManualOverrideHint": "Pas dans le catalogue ; activer si pris en charge.",diff --git a/packages/i18n/src/locales/ko/index.ts b/packages/i18n/src/locales/ko/index.tsindex 62882121f..285b6e800 100644--- a/packages/i18n/src/locales/ko/index.ts+++ b/packages/i18n/src/locales/ko/index.ts@@ -514,7 +514,6 @@ export const ko = {modelBadgeVision: "비전",permissionMode: "권한 모드",reasoningLevel: "추론 수준",- reasoningSupportedBy: "현재 모델 {{model}}은(는) 다음 추론 수준을 지원합니다",permissionInherit: "기본값",permissionAsk: "매번 묻기",permissionAcceptEdits: "편집 허용",@@ -1321,12 +1320,6 @@ sklm: {connectionNoModelList_other: "이 서비스는 모델 목록을 제공하지 않습니다 · 알려진 모델 {{count}}개",changeService: "변경",changeServiceTitle: "서비스 변경",- modelsSummaryTitle: "모델",- modelsSummaryLoading: "모델을 불러오는 중…",- modelsSummaryFailed: "모델을 불러오지 못했습니다. 위의 연결을 확인하거나 ID로 모델을 추가하세요.",- manageModels: "모델 관리",- collapseModels: "접기",- addModelManually: "모델 직접 추가",modelReasoningTag: "추론",modelsAutoPicked: "추천 모델이 자동으로 선택되었습니다. 모델 관리에서 조정할 수 있습니다.",presetOpenai: "OpenAI",@@ -1465,7 +1458,7 @@ sklm: {maxOutput: "최대 출력",supportedThinkingLevels: "생각 수준",defaultThinkingLevel: "기본 생각 수준",- modelCapabilities: "첨부 파일",+ modelCapabilities: "기능",imageInput: "이미지",documentInput: "PDF",thinkingManualOverrideHint: "카탈로그에 없음. 지원되는 경우 활성화하세요.",diff --git a/packages/i18n/src/locales/pt-BR/index.ts b/packages/i18n/src/locales/pt-BR/index.tsindex 83270dd5e..1d6cfe0dc 100644--- a/packages/i18n/src/locales/pt-BR/index.ts+++ b/packages/i18n/src/locales/pt-BR/index.ts@@ -503,7 +503,6 @@ export const ptBR = {modelBadgeVision: "Visão",permissionMode: "Modo de permissão",reasoningLevel: "Nível de raciocínio",- reasoningSupportedBy: "O modelo atual {{model}} suporta estes níveis de raciocínio",permissionInherit: "Herdar",permissionAsk: "Perguntar",permissionAcceptEdits: "Aceitar edições",@@ -1270,12 +1269,6 @@ export const ptBR = {connectionNoModelList_other: "Este serviço não lista modelos · {{count}} modelos conhecidos",changeService: "Alterar",changeServiceTitle: "Alterar serviço",- modelsSummaryTitle: "Modelos",- modelsSummaryLoading: "Carregando modelos…",- modelsSummaryFailed: "Não foi possível carregar modelos. Verifique a conexão acima ou adicione um modelo pelo ID.",- manageModels: "Gerenciar modelos",- collapseModels: "Recolher",- addModelManually: "Adicionar modelo manualmente",modelReasoningTag: "Raciocínio",modelsAutoPicked: "Selecionados entre os modelos recomendados. Ajuste-os em Gerenciar modelos.",serviceRowLabel: "{{name}}. Pressione Enter para editar; arraste ou use as teclas de seta para cima e para baixo para reordenar.",@@ -1411,7 +1404,7 @@ export const ptBR = {maxOutput: "Saída máxima",supportedThinkingLevels: "Níveis de raciocínio",defaultThinkingLevel: "Nível de raciocínio padrão",- modelCapabilities: "Anexos",+ modelCapabilities: "Recursos",imageInput: "Imagens",documentInput: "PDF",thinkingManualOverrideHint: "Substitui a configuração padrão de raciocínio deste modelo.",diff --git a/packages/i18n/src/locales/tr/index.ts b/packages/i18n/src/locales/tr/index.tsindex a2cb55a5f..1ef9cb64c 100644--- a/packages/i18n/src/locales/tr/index.ts+++ b/packages/i18n/src/locales/tr/index.ts@@ -514,7 +514,6 @@ export const tr = {modelBadgeVision: "görüntü",permissionMode: "İzin kipi",reasoningLevel: "Akıl yürütme düzeyi",- reasoningSupportedBy: "Geçerli model {{model}} bu akıl yürütme düzeylerini destekliyor",permissionInherit: "Varsayılan",permissionAsk: "Her seferinde sor",permissionAcceptEdits: "Düzenlemeleri kabul et",@@ -1311,12 +1310,6 @@ sklm: {connectionNoModelList_other: "Bu servis model listelemiyor · bilinen {{count}} model",changeService: "Değiştir",changeServiceTitle: "Servisi değiştir",- modelsSummaryTitle: "Modeller",- modelsSummaryLoading: "Modeller yükleniyor…",- modelsSummaryFailed: "Modeller yüklenemedi. Yukarıdaki bağlantıyı kontrol edin veya kimliğiyle bir model ekleyin.",- manageModels: "Modelleri yönet",- collapseModels: "Daralt",- addModelManually: "Elle model ekle",modelReasoningTag: "Akıl yürütme",modelsAutoPicked: "Önerilen modeller seçildi. Modelleri yönet bölümünden değiştirebilirsiniz.",presetOpenai: "OpenAI",@@ -1455,7 +1448,7 @@ sklm: {maxOutput: "En fazla çıktı",supportedThinkingLevels: "Düşünme düzeyleri",defaultThinkingLevel: "Varsayılan düşünme düzeyi",- modelCapabilities: "Ekler",+ modelCapabilities: "Yetenekler",imageInput: "Görüntüler",documentInput: "PDF",thinkingManualOverrideHint: "Katalogda yok; destekleniyorsa açın.",diff --git a/packages/i18n/src/locales/zh-CN/index.ts b/packages/i18n/src/locales/zh-CN/index.tsindex 60fb87278..db3685e06 100644--- a/packages/i18n/src/locales/zh-CN/index.ts+++ b/packages/i18n/src/locales/zh-CN/index.ts@@ -509,7 +509,6 @@ export const zhCN = {modelBadgeVision: "视觉",permissionMode: "权限模式",reasoningLevel: "推理等级",- reasoningSupportedBy: "当前模型 {{model}} 支持的推理等级",permissionInherit: "跟随默认",permissionAsk: "每次询问",permissionAcceptEdits: "允许编辑",@@ -1295,12 +1294,6 @@ sklm: {connectionNoModelList_other: "该服务不提供模型列表 · 已知 {{count}} 个模型",changeService: "更换",changeServiceTitle: "更换服务",- modelsSummaryTitle: "模型",- modelsSummaryLoading: "正在获取模型…",- modelsSummaryFailed: "无法获取模型。请检查上方的连接,或按 ID 手动添加。",- manageModels: "管理模型",- collapseModels: "收起",- addModelManually: "手动添加模型",modelReasoningTag: "推理",modelsAutoPicked: "已按推荐自动选择,可在「管理模型」中调整。",presetOpenai: "OpenAI",@@ -1436,7 +1429,7 @@ sklm: {maxOutput: "最大输出",supportedThinkingLevels: "思考等级",defaultThinkingLevel: "默认思考等级",- modelCapabilities: "附件",+ modelCapabilities: "能力",imageInput: "图片",documentInput: "PDF",thinkingManualOverrideHint: "目录未标注,可手动开启",diff --git a/packages/i18n/src/locales/zh-TW/index.ts b/packages/i18n/src/locales/zh-TW/index.tsindex 646fb71ba..b0719de56 100644--- a/packages/i18n/src/locales/zh-TW/index.ts+++ b/packages/i18n/src/locales/zh-TW/index.ts@@ -509,7 +509,6 @@ export const zhTW = {modelBadgeVision: "視覺",permissionMode: "許可權模式",reasoningLevel: "推理等級",- reasoningSupportedBy: "當前模型 {{model}} 支援的推理等級",permissionInherit: "跟隨預設",permissionAsk: "每次詢問",permissionAcceptEdits: "允許編輯",@@ -1295,12 +1294,6 @@ sklm: {connectionNoModelList_other: "該服務不提供模型清單 · 已知 {{count}} 個模型",changeService: "更換",changeServiceTitle: "更換服務",- modelsSummaryTitle: "模型",- modelsSummaryLoading: "正在取得模型…",- modelsSummaryFailed: "無法取得模型。請檢查上方的連線,或依 ID 手動新增。",- manageModels: "管理模型",- collapseModels: "收起",- addModelManually: "手動新增模型",modelReasoningTag: "推理",modelsAutoPicked: "已依推薦自動選擇,可在「管理模型」中調整。",presetOpenai: "OpenAI",@@ -1436,7 +1429,7 @@ sklm: {maxOutput: "最大輸出",supportedThinkingLevels: "思考等級",defaultThinkingLevel: "預設思考等級",- modelCapabilities: "附件",+ modelCapabilities: "能力",imageInput: "圖片",documentInput: "PDF",thinkingManualOverrideHint: "目錄未標註,可手動開啟",diff --git a/scripts/e2e/image-generation-ui.tsx b/scripts/e2e/image-generation-ui.tsxindex bd1a90bb9..c2eddda10 100644--- a/scripts/e2e/image-generation-ui.tsx+++ b/scripts/e2e/image-generation-ui.tsx@@ -118,8 +118,9 @@ globalThis.imageGenerationProbe = async () => {);const editProviderForModelSettings = async (name?: string) => {editProvider(name);- await until(() => !!button(i18n.t("settings.manageModels")), "model summary action missing");- click(button(i18n.t("settings.manageModels")));+ // The editor opens straight on the model panel, so there is no summary to+ // unfold before the per-model controls are reachable (D625).+ await until(() => !!document.querySelector(".provider-chosen-row"), "model settings missing");};const imageModelToggle = (label: string) =>[...document.querySelectorAll<HTMLInputElement>(diff --git a/scripts/e2e/provider-api-style.tsx b/scripts/e2e/provider-api-style.tsxindex 76e25a52a..7dba83949 100644--- a/scripts/e2e/provider-api-style.tsx+++ b/scripts/e2e/provider-api-style.tsx@@ -165,7 +165,8 @@ globalThis.providerApiStyleProbe = async () => {const searchInput = () => [...document.querySelectorAll<HTMLInputElement>("input[type=checkbox]")].find((input) => input.closest("label")?.textContent?.trim() === i18n.t("settings.nativeWebSearch"));const openModelManager = async () => {- click(control("settings.manageModels"));+ // The model panel is on screen when the editor opens (D625): no Manage+ // models step, only the per-model controls the scenario waits for.await until(() => Boolean(searchInput()), "model capability settings");};try {@@ -323,10 +324,9 @@ globalThis.providerApiStyleProbe = async () => {const accountAdvanced = document.querySelector<HTMLButtonElement>(".provider-chosen-advanced-toggle");if (accountAdvanced?.getAttribute("aria-expanded") === "false") click(accountAdvanced);await pause(650);- // Models open as a summary (D625); the per-model controls sit behind- // Manage models and the row's own Advanced disclosure.- assert(document.querySelector(".provider-models-summary"), `${locale}: account dialog did not open on the summary`);- click(control("settings.manageModels"));+ // The account editor opens straight on the model panel (D625): the+ // per-model controls sit behind the row's own Advanced disclosure.+ assert(!document.querySelector(".provider-models-summary"), `${locale}: the chosen-models summary is gone from the account dialog`);await frame();const advancedToggle = document.querySelector<HTMLButtonElement>(".provider-chosen-advanced-toggle");assert(advancedToggle?.getAttribute("aria-expanded") === "false", `${locale}: a model opened its advanced settings on its own`);