Deployments: API keys, deploy from the library, reorganized form

- Settings → API keys (generate or paste, show again, delete). Deployments with
  "Require an API key" get them via LLAMA_API_KEY / VLLM_API_KEY (--api-key for
  several vLLM keys); values are masked in the stored/shown command and in logs.
  The chat proxy sends a key.
- "Deploy" in the library and on the model page preselects the model and a
  runtime that can serve it; library rows and the model page link to the
  model's deployments.
- Deployment form: grouped launch options with flags next to labels, command in
  its own step, extra arguments as flag/value rows (runtime form too).
- Native selects follow the dark theme (color-scheme), fixing unreadable options.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Pascal LinxweilerandClaude Opus 5.5 committed 2026-10-06 12:28:25 +02:00
1 parent 66e6a8c4f7
commit ea1f18cc74
32 files changed
+2478 -183

No files matched your search

+13
View File
@@ -451,6 +451,8 @@ export type DeploymentOptions = {
flashAttn?: "auto" | "on" | "off" | null;
/** llama.cpp: serve the built-in web UI at / (llama-server's default; false passes --no-webui). */
webui?: boolean | null;
/** Only accept requests with one of the API keys from Settings → API keys. */
requireApiKey?: boolean | null;
/** vLLM */
dtype?: string | null;
maxNumSeqs?: number | null;
@@ -510,3 +512,14 @@ export const deploymentLogs = sqliteTable(
},
(t) => [index("deployment_logs_idx").on(t.deploymentId, t.id)],
);
/**
* API keys that deployments with `requireApiKey` accept. Stored in plain text because the worker
* hands them to the runtime container; never logged or written into a stored command line.
*/
export const apiKeys = sqliteTable("api_keys", {
id: id(),
name: text("name").notNull(),
key: text("key").notNull().unique(),
createdAt: createdAt(),
});