Skip to content

Commit 1252b65

Browse files
committed
stop loading models.dev format from global config
1 parent 6840276 commit 1252b65

File tree

2 files changed

+1
-28
lines changed

2 files changed

+1
-28
lines changed

opencode.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
22
"$schema": "https://opencode.ai/config.json",
3-
"mcp": {},
4-
"provider": {}
3+
"mcp": {}
54
}

packages/opencode/src/provider/provider.ts

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -115,32 +115,6 @@ export namespace Provider {
115115
}
116116

117117
const configProviders = Object.entries(config.provider ?? {})
118-
for await (const providerPath of new Bun.Glob("*/provider.toml").scan({
119-
cwd: Global.Path.providers,
120-
})) {
121-
const [providerID] = providerPath.split("/")
122-
const toml = await import(
123-
path.join(Global.Path.providers, providerPath),
124-
{
125-
with: {
126-
type: "toml",
127-
},
128-
}
129-
).then((mod) => mod.default)
130-
toml.models = {}
131-
const modelsPath = path.join(Global.Path.providers, providerID, "models")
132-
for await (const modelPath of new Bun.Glob("**/*.toml").scan({
133-
cwd: modelsPath,
134-
})) {
135-
const modelID = modelPath.slice(0, -5)
136-
toml.models[modelID] = await import(path.join(modelsPath, modelPath), {
137-
with: {
138-
type: "toml",
139-
},
140-
})
141-
}
142-
configProviders.unshift([providerID, toml])
143-
}
144118

145119
for (const [providerID, provider] of configProviders) {
146120
const existing = database[providerID]

0 commit comments

Comments
 (0)