{ if (e.target === e.currentTarget) onClose(); }} >
Commit AI

AI settings

{ e.preventDefault(); void handleSave(); }}>
{#if provider === "local"}
Switching downloads the model{selectedLocalModel ? ` (${formatSize(selectedLocalModel.approx_size_mb)})` : ""} in the background — depending on your internet connection this can take several minutes. After that it stays cached locally and loads instantly on the next start.
{:else if provider === "openai"}
API key
{:else if provider === "anthropic"}
API key
{:else}
API key (optional)
For local OpenAI-compatible servers like Ollama or LM Studio. The base URL should end in /v1.
{/if} {#if error}

{error}

{/if}