import { ImageResponse } from 'next/og'; import { Wallpaper } from '@/components/brand/og'; import { intel, safe } from '@/lib/api'; import { fmtInt, fmtScore } from '@/lib/format'; import { SITE_NAME } from '@/lib/site'; export const runtime = 'nodejs'; export const alt = `The AI frontier right now on ${SITE_NAME}`; export const size = { width: 1200, height: 630 }; export const contentType = 'image/png'; export default async function FrontierOgImage() { const f = await safe(intel.frontier(3)); const counters: [string, string][] = []; if (f) { counters.push(['Benchmarks tracked', fmtInt(f.benchmark_frontier?.length ?? 0)]); counters.push(['Frontier models', fmtInt(f.price_frontier?.frontier_models)]); const lead = f.benchmark_frontier?.[0]?.leader; if (lead) counters.push([`Leads ${f.benchmark_frontier?.[0]?.benchmark.name ?? ''}`.slice(0, 28), `${lead.model.name} · ${fmtScore(lead.score)}`.slice(0, 30)]); counters.push(['Pareto set', fmtInt(f.efficiency_frontier?.frontier?.length ?? 0)]); } return new ImageResponse(, { ...size }); }