Open History to see the last commit
1/**
2 * Hand-written wrapper. DO NOT regenerate this file.
3 *
4 * The model data lives in `vercel-gateway.models.json` (regenerated by
5 * `fetch-vercel-gateway-models.ts`). This wrapper re-exports it typed so
6 * consumers can keep `import { models } from './vercel-gateway.models'`.
7 *
8 * The data is loaded via `JSON.parse(readFileSync(...))` rather than an
9 * `import ... with { type: 'json' }` attribute so the loader doesn't have
10 * to support JSON import attributes.
11 */
12
13import { readFileSync } from 'node:fs'
14import { dirname, resolve } from 'node:path'
15import { fileURLToPath } from 'node:url'
16
17export interface VercelGatewayCatalogModel {
18 id: string
19 object?: string
20 created?: number
21 owned_by?: string
22 type?: string
23 tags?: Array<string>
24 modalities?: {
25 input?: Array<string>
26 output?: Array<string>
27 }
28 supported_parameters?: Array<string>
29 [key: string]: unknown
30}
31
32const __dirname = dirname(fileURLToPath(import.meta.url))
33const DATA_PATH = resolve(__dirname, 'vercel-gateway.models.json')
34
35export const models: Array<VercelGatewayCatalogModel> = JSON.parse(
36 readFileSync(DATA_PATH, 'utf-8'),
37)