5e13527416
Co-authored-by: opencode <opencode@sst.dev> Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
12 lines
288 B
TypeScript
12 lines
288 B
TypeScript
export async function data() {
|
|
const path = Bun.env.MODELS_DEV_API_JSON
|
|
if (path) {
|
|
const file = Bun.file(path)
|
|
if (await file.exists()) {
|
|
return await file.text()
|
|
}
|
|
}
|
|
const json = await fetch("https://models.dev/api.json").then((x) => x.text())
|
|
return json
|
|
}
|