mirror of
https://github.com/anomalyco/opencode.git
synced 2026-04-29 13:09:46 +00:00
get rid of models.dev macro
This commit is contained in:
parent
d9eebba90e
commit
e3c1861a3e
7 changed files with 48 additions and 43 deletions
|
|
@ -15,6 +15,14 @@ process.chdir(dir)
|
|||
import pkg from "../package.json"
|
||||
import { Script } from "@opencode-ai/script"
|
||||
|
||||
// Fetch and generate models.dev snapshot
|
||||
const modelsData = await fetch(`https://models.dev/api.json`).then((x) => x.text())
|
||||
await Bun.write(
|
||||
path.join(dir, "src/provider/models-snapshot.ts"),
|
||||
`// Auto-generated by build.ts - do not edit\nexport const snapshot = ${modelsData} as const\n`,
|
||||
)
|
||||
console.log("Generated models-snapshot.ts")
|
||||
|
||||
const singleFlag = process.argv.includes("--single")
|
||||
const baselineFlag = process.argv.includes("--baseline")
|
||||
const skipInstall = process.argv.includes("--skip-install")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue