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:
1 parent
66e6a8c4f7
commit
ea1f18cc74
32 files changed
+2478
-183
No files matched your search
@@ -1,6 +1,7 @@
|
||||
import "server-only";
|
||||
import { and, asc, desc, eq, sql } from "drizzle-orm";
|
||||
import { db } from "@/lib/db/client";
|
||||
import { deploymentsByModel, listDeployableModels } from "@/lib/deployments";
|
||||
import { modelFiles, models, modelTags, tags } from "@/lib/db/schema";
|
||||
import { modelFamilies } from "@/lib/hub/metadata";
|
||||
import { fileRole } from "@/lib/file-roles";
|
||||
@@ -52,6 +53,9 @@ export async function listLibrary() {
|
||||
const tagsByModel = new Map<string, Tag[]>();
|
||||
for (const t of tagRows) tagsByModel.set(t.modelId, [...(tagsByModel.get(t.modelId) ?? []), { id: t.id, name: t.name, color: t.color }]);
|
||||
|
||||
const [byModel, deployable] = await Promise.all([deploymentsByModel(), listDeployableModels()]);
|
||||
const deployableIds = new Set(deployable.map((m) => m.id));
|
||||
|
||||
return rows.map(({ updateDiff, ...r }) => ({
|
||||
...r,
|
||||
updateAvailable: !!updateDiff && updateDiff.sha === r.remoteSha && r.remoteSha !== r.pinnedSha,
|
||||
@@ -61,6 +65,8 @@ export async function listLibrary() {
|
||||
hubTags: r.hubTags ?? [],
|
||||
quants: [...(quants.get(r.id) ?? [])].sort(),
|
||||
tags: tagsByModel.get(r.id) ?? [],
|
||||
deployable: deployableIds.has(r.id),
|
||||
deployments: byModel.get(r.id) ?? [],
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user