# TRUEREF-0018 — Embedding Provider Configuration UI **Priority:** P2 **Status:** Pending **Depends On:** TRUEREF-0007, TRUEREF-0015 **Blocks:** — --- ## Overview A settings page within the web UI that allows users to configure the embedding provider without editing environment variables or config files. Supports switching between "None" (FTS5-only), OpenAI-compatible API, and local model (if available). Includes a live connectivity test before saving. --- ## Acceptance Criteria - [ ] Settings page at `/settings` with embedding provider section - [ ] Provider selector: None / OpenAI-compatible / Local model - [ ] OpenAI provider form: base URL, API key (masked), model name, dimensions - [ ] "Test Connection" button that validates the API key and model before saving - [ ] Success/error feedback from connection test - [ ] Save configuration (calls `PUT /api/v1/settings/embedding`) - [ ] Current configuration loaded from `GET /api/v1/settings/embedding` - [ ] Warning shown when "None" is selected (search will be FTS5-only, lower quality) - [ ] Local model option shows whether `@xenova/transformers` is installed - [ ] Preset buttons for common providers (OpenAI, Ollama, Azure OpenAI) --- ## Provider Presets ```typescript const PROVIDER_PRESETS = [ { name: 'OpenAI', baseUrl: 'https://api.openai.com/v1', model: 'text-embedding-3-small', dimensions: 1536 }, { name: 'Ollama (local)', baseUrl: 'http://localhost:11434/v1', model: 'nomic-embed-text', dimensions: 768 }, { name: 'Azure OpenAI', baseUrl: 'https://{resource}.openai.azure.com/openai/deployments/{deployment}/v1', model: 'text-embedding-3-small', dimensions: 1536 } ]; ``` --- ## Settings Page Component ```svelte
Embeddings enable semantic search. Without them, only keyword search (FTS5) is used.