showModelDropdown = !showModelDropdown} class="px-2 py-0.5 text-xs rounded bg-gray-100 text-gray-700 border hover:bg-gray-200 flex items-center gap-1" >
Model: {currentModelLabel}
{#if models.length > 0} {@const currentModel = models.find(m => modelNameMap[m.id] === currentModelLabel)} {@const pricingText = formatPricing(currentModel?.pricing)} {#if pricingText}
({pricingText}¢)
{/if} {/if}
{#if showModelDropdown}
Primary Model (others are fallbacks)
{#each models as model, index} {#if model.enabled} {@const pricingText = formatPricing(model.pricing)}
{ setPrimaryModel(model.id); showModelDropdown = false; }} class="w-full flex justify-between items-start px-3 py-2 text-sm hover:bg-gray-50 cursor-pointer rounded text-left {index === 0 ? 'bg-blue-50 text-blue-700' : ''}" >
{model.name}
{#if pricingText}
{pricingText} ¢/1K (in/out)
{/if}
{#if index === 0}
primary
{/if}
{/if} {/each}
{/if}