mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-19 16:40:48 +00:00
add check incase provider doesnt exist in models list
This commit is contained in:
parent
50dfa9caf3
commit
7d3c7a9f65
1 changed files with 6 additions and 1 deletions
|
|
@ -870,7 +870,12 @@ export namespace Provider {
|
|||
|
||||
for (const [providerID, fn] of Object.entries(CUSTOM_LOADERS)) {
|
||||
if (disabled.has(providerID)) continue
|
||||
const result = await fn(database[providerID])
|
||||
const data = database[providerID]
|
||||
if (!data) {
|
||||
log.error("Provider does not exist in model list " + providerID)
|
||||
continue
|
||||
}
|
||||
const result = await fn(data)
|
||||
if (result && (result.autoload || providers[providerID])) {
|
||||
if (result.getModel) modelLoaders[providerID] = result.getModel
|
||||
mergeProvider(providerID, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue