Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/cli/script/generate.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const modelsUrl = process.env.OPENCODE_MODELS_URL || "https://models.dev"
const modelsUrl = process.env.OPENCODE_MODELS_URL || "https://models.opencode.ai"

export const modelsData = process.env.MODELS_DEV_API_JSON
? await Bun.file(process.env.MODELS_DEV_API_JSON).text()
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/models-dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ const layer = Layer.effect(
),
)

const source = Flag.OPENCODE_MODELS_URL || "https://models.dev"
const source = Flag.OPENCODE_MODELS_URL || "https://models.opencode.ai"
const filepath = path.join(
Global.Path.cache,
source === "https://models.dev" ? "models.json" : `models-${Hash.fast(source)}.json`,
source === "https://models.opencode.ai" ? "models.json" : `models-${Hash.fast(source)}.json`,
)
const ttl = Duration.minutes(5)
const lockKey = `models-dev:${filepath}`
Expand Down
2 changes: 1 addition & 1 deletion packages/llm/script/recording-cost-report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as fs from "node:fs/promises"
import * as path from "node:path"

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

type JsonRecord = Record<string, unknown>

Expand Down
6 changes: 3 additions & 3 deletions packages/stats/app/src/routes/model-catalog.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { query } from "@solidjs/router"

export const modelCatalogSourceUrl = "https://models.dev/catalog.json"
export const modelCatalogPricingUrl = "https://models.dev/api.json"
export const modelCatalogLabSourceUrl = "https://models.dev/labs"
export const modelCatalogSourceUrl = "https://models.opencode.ai/catalog.json"
export const modelCatalogPricingUrl = "https://models.opencode.ai/api.json"
export const modelCatalogLabSourceUrl = "https://models.opencode.ai/labs"

export type ModelCatalogCost = {
input: number
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function providerIconsPlugin() {
}

async function fetchProviderIcons() {
const url = process.env.OPENCODE_MODELS_URL || "https://models.dev"
const url = process.env.OPENCODE_MODELS_URL || "https://models.opencode.ai"
const providers = await fetch(`${url}/api.json`)
.then((res) => res.json())
.then((json) => Object.keys(json))
Expand Down
Loading