BYO AI settings: custom instructions, model picker, key show/hide
release gate / check (push) Failing after 6m26s
release / smoke (push) Successful in 10m16s
release / publish (push) Failing after 9m57s

Mirrors the BYOK dialog suggested in issue #2:
- UserAiConfig gains an optional instructions column (schema.sql +
  migration 016); PUT validates (<=4000 chars) and full-replaces it.
- Instructions ride along on the assistant chat system prompt only
  (chatSystemWith); the automation compiler and page-extraction prompts
  stay server-owned contracts.
- Settings -> AI: labeled fields, per-provider suggested-model dropdown
  with a custom-model escape hatch, API key show/hide toggle, and the
  instructions textarea.
- Tests: projection echo, omission clears, cap validation, and the
  system-prompt assertion via a recorded fake provider body.
This commit is contained in:
Andrew S Erwin
2026-10-31 19:09:44 -05:00
parent 1dfd41986c
commit 09f8a5d933
10 changed files with 272 additions and 81 deletions
+6 -4
View File
@@ -187,10 +187,12 @@ install it); the index-backed page search depends on it.
set (no logins, no bookings, no deletes, no multi-step chains yet),
every fetch goes through the same private-range network guard as
previews, and email actions are hard-capped. AI is **bring-your-own-key**
per user (Settings → AI: provider, model, key — encrypted at rest) with
an optional server-wide key for plans that include it; without any key,
AI features report "not configured" and everything else keeps working.
Details: RUNNING.md → "AI automations".
per user (Settings → AI: provider, model picker, key with show/hide —
encrypted at rest — plus optional **custom instructions** that refine the
in-app assistant's tone and focus; the automation and page-reading prompts
stay server-owned) with an optional server-wide key for plans that include
it; without any key, AI features report "not configured" and everything
else keeps working. Details: RUNNING.md → "AI automations".
### Connecting Authelia (OIDC)