mirror of
https://github.com/bitbaum/substrata.git
synced 2026-12-04 14:58:05 +01:00
- ai-kit ^1.17.0; /api/ai-key/models uses @bitbaum/ai-kit/byok-probe instead of fetchCatalog, which said "works" for a dead OpenRouter key (its /models is public; only /key refuses) - PUT and PATCH probe the key again before sealing and reject a model the key cannot use (lib/byok-check.ts); a dead key is never stored - one admission rule, lib/byok-admit.ts, shared by the server and the browser-only path, so "Use this key" stays off until a check passed - panel: paste -> auto-check (600ms) -> select of the key's models with the strongest preselected; free text only when the vendor lists none; the vendor's refusal in its own words; Change model / Replace key / Remove - tests: unchecked, refused and unlisted keys rejected; routes vet before they write (each guard proven by mutation) - docs: Ask moves to @bitbaum/chatkit once it is published Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>