- deployments + deployment_logs tables; desired/actual state reconciled by the worker (create/start/stop/remove via the socket proxy, /health wait, log follower, stats, memory guard, adopt/remove containers on restart). - Pure command builder for llama-server and vllm serve (mmproj, MTP draft, KV cache types, dtype, KV cache size) with tests; file candidates per engine with tests. - New main menu entry Deployments: list, new/edit form (runtime -> model and files -> launch options, live command preview), detail page with stats, log, endpoint and a streaming chat smoke test. Not yet tested end-to-end against real containers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
12 lines
513 B
TypeScript
12 lines
513 B
TypeScript
import { NextResponse } from "next/server";
|
|
import { withAuth } from "@/lib/api-auth";
|
|
import { listDeploymentLogs } from "@/lib/deployments";
|
|
|
|
export const dynamic = "force-dynamic";
|
|
|
|
/** Log lines after `?after=<id>` (first call: the last 500). */
|
|
export const GET = withAuth<RouteContext<"/api/deployments/[id]/logs">>(async (req, { params }) => {
|
|
const after = Number(new URL(req.url).searchParams.get("after") ?? 0) || 0;
|
|
return NextResponse.json(await listDeploymentLogs((await params).id, after));
|
|
});
|