import { PlusIcon, ServerIcon } from "lucide-react"; import type { Metadata } from "next"; import Link from "next/link"; import { buttonVariants } from "@/components/ui/button"; import { Card } from "@/components/ui/card"; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"; import { ENGINE_LABEL } from "@/lib/benchmark-meta"; import { headline } from "@/lib/benchmark-view"; import { listBenchmarks } from "@/lib/benchmarks"; import { listEndpoints } from "@/lib/endpoints"; import { PageHero } from "@/components/hero/page-hero"; import { EndpointStatus } from "./endpoint-status"; export const dynamic = "force-dynamic"; export const metadata: Metadata = { title: "Endpoints" }; export default async function EndpointsPage() { const [endpoints, runs] = await Promise.all([listEndpoints(), listBenchmarks()]); // Newest completed speed run and quality score per endpoint. const latest = new Map(); for (const r of runs) { if (!r.endpointId || r.state !== "completed") continue; const cur = latest.get(r.endpointId) ?? { decode: null, quality: null }; if (r.kind === "run" && cur.decode == null) cur.decode = headline(r.summary).decode; if (r.kind === "eval" && cur.quality == null) cur.quality = r.quality?.score ?? null; latest.set(r.endpointId, cur); } return ( Add endpoint } > {endpoints.length === 0 ? (

No endpoints yet. Add the URL of a llama.cpp, vLLM, SGLang or Ollama server, describe its hardware, and benchmark it.

) : ( Endpoint Model Hardware Decode t/s Quality Status {endpoints.map((e) => { const l = latest.get(e.id); const engine = e.hardware.engineName || (e.engine ?? e.probe?.engine ? ENGINE_LABEL[(e.engine ?? e.probe?.engine)!] : null); return ( {e.name}
{e.baseUrl} {engine && ` · ${engine}${e.probe?.engineVersion ? ` ${e.probe.engineVersion}` : ""}`}
{e.model ?? (e.probe?.models.length === 1 ? e.probe.models[0] : "–")} {e.hardware.gpuName ? `${e.hardware.gpuCount ?? 1}× ${e.hardware.gpuName}` : (e.hardware.cpu ?? "–")} {l?.decode != null ? l.decode.toFixed(1) : "–"} {l?.quality != null ? `${l.quality}%` : "–"}
); })}
)}
); }