Release 0.4.0: Kaname, search, filters and tags
Release / release (push) Successful in 11m41s

- Rename the app to Kaname
- Hub metadata per model (base models, architecture, license, Hub tags),
  backfilled by the worker for existing models
- Library search across repo/author/family/quant/tags and multi-select
  facet filters (author, family, quant, tag, status) kept in the URL
- Custom tags (model page editor, on add, click-to-filter)
- README rewritten around a quick install, with banner and screenshots
- deploy/compose.yaml: models in a host folder (KANAME_MODELS_DIR)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Pascal LinxweilerandClaude Opus 5.5 committed 2026-10-05 19:49:17 +02:00
1 parent 2167ea0950
commit 67191b3e16
37 files changed
+2028 -206

No files matched your search

+5 -1
View File
@@ -5,6 +5,7 @@ import { apiError, handleApiError } from "@/lib/api-errors";
import { REPO_ID_RE, SHA_RE } from "@/lib/hub/client";
import { queueDownload } from "@/lib/jobs";
import { addModel, ModelError } from "@/lib/models";
import { addTag, normalizeTagName, TagError } from "@/lib/tags";
const Body = z.object({
repoId: z.string().regex(REPO_ID_RE),
@@ -13,22 +14,25 @@ const Body = z.object({
include: z.array(z.string().min(1).max(1024)).max(10_000),
exclude: z.array(z.string().min(1).max(1024)).max(1_000),
download: z.boolean().default(true),
tags: z.array(z.string()).max(50).default([]),
});
/** Add a model to the library, pinned to the SHA the user reviewed, and queue its download. */
export const POST = withAuth(async (req) => {
try {
const body = Body.parse(await req.json());
body.tags.forEach(normalizeTagName); // validate before anything is written
const { id } = await addModel({
repoId: body.repoId,
revision: body.revision,
sha: body.sha,
rule: { include: body.include, exclude: body.exclude },
});
for (const tag of body.tags) await addTag(id, tag);
const job = body.download ? await queueDownload(id) : null;
return NextResponse.json({ id, jobId: job?.jobId ?? null }, { status: 201 });
} catch (err) {
if (err instanceof ModelError) return apiError(err.status, err.code, err.message);
if (err instanceof ModelError || err instanceof TagError) return apiError(err.status, err.code, err.message);
return handleApiError(err);
}
});