/** * llmindex.io — GET /api/v1/methodology (machine-readable weights + IRT hyperparams) * Author: Simon-Pierre Boucher * Contact: contact@spboucher.ai * License: Proprietary — © Simon-Pierre Boucher, all rights reserved */ import { type NextRequest } from 'next/server'; import { CONTAMINATION_DELTA_FLOOR, DOMAINS, DOMAIN_WEIGHTS, INDEX_VERSION, IRT_HYPERPARAMS, SUBMETRIC_WEIGHTS, THETA_SCALE, } from '@llmindex/scoring'; import { apiJson } from '@/lib/api'; import { rateLimit } from '@/lib/rate-limit'; export const dynamic = 'force-dynamic'; export async function GET(req: NextRequest) { const limited = await rateLimit(req); if (limited) return limited; return apiJson( { index_version: INDEX_VERSION, domains: DOMAINS, domain_weights: DOMAIN_WEIGHTS, submetric_weights: SUBMETRIC_WEIGHTS, irt_hyperparams: IRT_HYPERPARAMS, theta_scale: THETA_SCALE, contamination_delta_floor: CONTAMINATION_DELTA_FLOOR, notes: 'Latency and cost are never blended into quality scores; they are published as an efficiency (Pareto) frontier.', }, { cacheSeconds: 3600 }, ); }