Files
tf_code/packages/opencode/src/provider/models-macro.ts
Albert O'Shea 5e13527416 feat: nix support for the nix folks (#3924)
Co-authored-by: opencode <opencode@sst.dev>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
2025-11-18 00:46:49 -06:00

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
}