GeezerVison is showing github.com — stop loading models.dev format from global config · pecastro/opencode@1252b65
File tree
Expand file treeCollapse file tree
Open diff view settings
packages/opencode/src/provider
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboard +1-2Lines changed: 1 addition & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | { |
2 | 2 | "$schema": "https://opencode.ai/config.json", |
3 | | - "mcp": {}, |
4 | | - "provider": {} |
| 3 | + "mcp": {} |
5 | 4 | } |
Collapse file
Copy file name to clipboardExpand all lines: packages/opencode/src/provider/provider.ts -26Lines changed: 0 additions & 26 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -115,32 +115,6 @@ export namespace Provider { |
115 | 115 | } |
116 | 116 |
|
117 | 117 | 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 | | - } |
144 | 118 |
|
145 | 119 | for (const [providerID, provider] of configProviders) { |
146 | 120 | const existing = database[providerID] |
|