(open = true), }} /> {#if enabledArr.length}
{#if currentModel && getModelIcon(currentModel.model_id)} {@const IconComponent = getModelIcon(currentModel.model_id)} {/if} {currentModel ? formatModelName(currentModel.model_id).full : 'Select model'}
{#if view === 'favorites' && pinnedModels.length > 0} {#each pinnedModels as model (model._id)} {@const formatted = formatModelName(model.model_id)} {@const openRouterModel = modelsState .from(Provider.OpenRouter) .find((m) => m.id === model.model_id)} {@const disabled = onlyImageModels && openRouterModel && !supportsImages(openRouterModel)} modelSelected(model.model_id)} >
{#if getModelIcon(model.model_id)} {@const ModelIcon = getModelIcon(model.model_id)} {/if}

{formatted.full}

{#if openRouterModel && supportsImages(openRouterModel)} {#snippet trigger(tooltip)}
{/snippet} Supports image analysis
{/if} {#if openRouterModel && supportsReasoning(openRouterModel)} {#snippet trigger(tooltip)}
{/snippet} Supports reasoning
{/if}
{/each} {:else if view === 'enabled'} {#if pinnedModels.length > 0} Pinned {#each pinnedModels as model (model._id)} {@render modelCard(model)} {/each} {/if} {#each groupedModels as [company, models] (company)} {@const filteredModels = models.filter((m) => !isPinned(m))} {#if filteredModels.length > 0} {company} {#each filteredModels as model (model._id)} {@render modelCard(model)} {/each} {/if} {/each} {/if}
{#if !isMobile.current && activeModelInfo && view === 'enabled'}
{/if}
{/if}
{#snippet modelCard(model: (typeof enabledArr)[number])} {@const formatted = formatModelName(model.model_id)} {@const openRouterModel = modelsState .from(Provider.OpenRouter) .find((m) => m.id === model.model_id)} {@const disabled = onlyImageModels && openRouterModel && !supportsImages(openRouterModel)} modelSelected(model.model_id)} >
{#if getModelIcon(model.model_id)} {@const ModelIcon = getModelIcon(model.model_id)} {/if}

{isMobile.current ? formatted.full : formatted.primary}

{#if openRouterModel && supportsImages(openRouterModel)} {#snippet trigger(tooltip)}
{/snippet} Supports image analysis
{/if} {#if openRouterModel && supportsReasoning(openRouterModel)} {#snippet trigger(tooltip)}
{/snippet} Supports reasoning
{/if}
{/snippet}