Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

llmgateway.models.ts

18 lines622 Bytes

1/**
2 * Hand-written wrapper. DO NOT regenerate this file.
3 *
4 * The model data lives in `llmgateway.models.json` (regenerated by
5 * `fetch-llmgateway-models.ts`). This wrapper re-exports it typed.
6 */
7​
8import { readFileSync } from 'node:fs'
9import { dirname, resolve } from 'node:path'
10import { fileURLToPath } from 'node:url'
11import type { LlmGatewayCatalogRow } from './model-sync/llmgateway.ts'
12​
13const __dirname = dirname(fileURLToPath(import.meta.url))
14const DATA_PATH = resolve(__dirname, 'llmgateway.models.json')
15​
16export const models: Array<LlmGatewayCatalogRow> = JSON.parse(
17 readFileSync(DATA_PATH, 'utf-8'),