Skip to content

Commit a4f25a9

Browse files
fix: use OpenCode model catalog URL (#39672)
Co-authored-by: Dax Raad <d@ironbay.co>
1 parent ff0382e commit a4f25a9

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

packages/cli/script/generate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const modelsUrl = process.env.OPENCODE_MODELS_URL || "https://models.dev"
1+
const modelsUrl = process.env.OPENCODE_MODELS_URL || "https://models.opencode.ai"
22

33
export const modelsData = process.env.MODELS_DEV_API_JSON
44
? await Bun.file(process.env.MODELS_DEV_API_JSON).text()

packages/core/src/models-dev.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,10 @@ const layer = Layer.effect(
151151
),
152152
)
153153

154-
const source = Flag.OPENCODE_MODELS_URL || "https://models.dev"
154+
const source = Flag.OPENCODE_MODELS_URL || "https://models.opencode.ai"
155155
const filepath = path.join(
156156
Global.Path.cache,
157-
source === "https://models.dev" ? "models.json" : `models-${Hash.fast(source)}.json`,
157+
source === "https://models.opencode.ai" ? "models.json" : `models-${Hash.fast(source)}.json`,
158158
)
159159
const ttl = Duration.minutes(5)
160160
const lockKey = `models-dev:${filepath}`

packages/llm/script/recording-cost-report.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as fs from "node:fs/promises"
22
import * as path from "node:path"
33

44
const RECORDINGS_DIR = path.resolve(import.meta.dir, "..", "test", "fixtures", "recordings")
5-
const MODELS_DEV_URL = "https://models.dev/api.json"
5+
const MODELS_DEV_URL = "https://models.opencode.ai/api.json"
66

77
type JsonRecord = Record<string, unknown>
88

packages/stats/app/src/routes/model-catalog.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { query } from "@solidjs/router"
22

3-
export const modelCatalogSourceUrl = "https://models.dev/catalog.json"
4-
export const modelCatalogPricingUrl = "https://models.dev/api.json"
5-
export const modelCatalogLabSourceUrl = "https://models.dev/labs"
3+
export const modelCatalogSourceUrl = "https://models.opencode.ai/catalog.json"
4+
export const modelCatalogPricingUrl = "https://models.opencode.ai/api.json"
5+
export const modelCatalogLabSourceUrl = "https://models.opencode.ai/labs"
66

77
export type ModelCatalogCost = {
88
input: number

packages/ui/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function providerIconsPlugin() {
4545
}
4646

4747
async function fetchProviderIcons() {
48-
const url = process.env.OPENCODE_MODELS_URL || "https://models.dev"
48+
const url = process.env.OPENCODE_MODELS_URL || "https://models.opencode.ai"
4949
const providers = await fetch(`${url}/api.json`)
5050
.then((res) => res.json())
5151
.then((json) => Object.keys(json))

0 commit comments

Comments
 (0)