refactor: trim custom-endpoint comments and share synthetic provider const

Review pass: shorten verbose doc comments across the custom-endpoint code,
merge duplicate imports, share one synthetic provider entry between the keys
section and setup dialog, collapse the duplicated connect-editor block, revert
an unrelated settings-route drive-by.
This commit is contained in:
Daniel Buckner
2026-10-27 15:56:17 -07:00
parent 870a1ad343
commit dbf80803cc
14 changed files with 92 additions and 226 deletions
+5 -10
View File
@@ -123,16 +123,11 @@ export const AUTH_PROVIDER_KEYS: readonly AuthProviderInfo[] = [
] as const;
/**
* THE SINGLE CUSTOM ENDPOINT's identity (custom-endpoint wave): a
* user-configured OpenAI-compatible server registered into pi-ai at runtime
* (server/custom-provider.ts). Deliberately NOT part of AUTH_PROVIDER_KEYS —
* that table is test-pinned to pi-ai's BUILT-IN providers
* (tests/auth-provider-keys.test.ts) and every row is env-var-keyed; the
* custom endpoint is keyed by a user-supplied BASE URL instead, and its API
* key rides this one reserved env var (OPTIONAL — keyless local servers such
* as Ollama / LM Studio are allowed). The Custom endpoint Settings section is
* its one home; the key is stored in auth.json under `envVar` like any other
* provider key (masked, env-reflected, no restart).
* THE single custom endpoint's identity: a user-configured OpenAI-compatible
* server registered into pi-ai at runtime (server/custom-provider.ts). NOT part
* of AUTH_PROVIDER_KEYS (that table is test-pinned to pi-ai's built-ins and is
* env-var-keyed); this one is keyed by a user-supplied base URL, and its key
* rides this reserved env var (optional — keyless local servers allowed).
*/
export const CUSTOM_PROVIDER = {
id: "custom",