MCPcopy Index your code
hub / github.com/anomalyco/models.dev / labPageMetadata

Function labPageMetadata

packages/web/src/render.tsx:552–570  ·  view source on GitHub ↗
(lab: LabEntry)

Source from the content-addressed store, hash-verified

550}
551
552function labPageMetadata(lab: LabEntry): PageMetadata {
553 const title = `${lab.name} models, providers, and specs | Models.dev`;
554 const description = compactMetadataDescription(
555 [
556 lab.description,
557 `Browse ${plural(lab.models.length, "model")} from ${lab.name} across ${plural(lab.providerCount, "provider")}.`,
558 factSentence([
559 lab.families.length > 0 ? `families like ${lab.families.slice(0, 4).join(", ")}` : undefined,
560 lab.lastUpdated ? `updated ${lab.lastUpdated}` : undefined,
561 `pricing`,
562 `context windows`,
563 `capabilities`,
564 ]),
565 ],
566 280,
567 );
568
569 return { title, description };
570}
571
572function compactMetadataDescription(parts: Array<string | undefined>, maxLength: number) {
573 const compacted = parts

Callers 1

buildPagesFunction · 0.85

Calls 3

pluralFunction · 0.85
factSentenceFunction · 0.85

Tested by

no test coverage detected