import type { ModelSpec } from "@elvis/ui"; import spec from "../../../backend/src/algorithms.json"; // The optimisers, from the spec shared with the Python backend. JSON imports // type "kind" as string, so the shape is checked by backend/tests instead. export const ALGORITHMS = spec.algorithms as unknown as ModelSpec[]; export function algorithmById(id: string): ModelSpec { return ALGORITHMS.find((a) => a.id === id) ?? ALGORITHMS[0]; }