{% extends "admin/base.html" %} {% block title %}Add LLM key — cmdop admin{% endblock %} {% block content %} {# Plan 61/2b W2 — Add LLM key wizard. Five steps, single Alpine component: 1. Pick provider — tile picker 2. Paste API key — masked input + format hint 3. Inline verify — live probe (POST /api/admin/wizards/add-llm-key/verify) 4. Set as default + spend cap 5. Done — success screen Reuses Wave 2a substrate macros (page_header step/step_total, card kind='roomy', tooltip). State lives in component-local memory + Redis (server-side, 30min TTL via the wizard cookie). #} {% from 'admin/components/ui.html' import card, input, page_header, tooltip %} {# tojson is HTML-safe by default (escapes " to "), so the attribute parses cleanly. |safe strips that escaping and breaks Alpine for the whole page. #}
Where will the gateway dispatch requests? {{ tooltip('Each provider supplies one API key; the same provider can hold multiple keys (e.g. dev + prod), one of them flagged as default.') }}
Saved encrypted via Fernet at rest. You won't see the full value again after submit.
Human-readable label. Multiple keys per provider allowed.
Leave empty to use the provider default.
We'll make one cheap live call to confirm the key reaches the provider. No request is recorded against your spend ledger.
Probe failed.
Double-check the key on the provider console and try again.
Optional tweaks. Either can be changed later from Provider keys.
The gateway picked it up — health probe will refresh automatically.