mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-17 12:56:41 +02:00
fix: ensure that plugins can register providers with config changes
This commit is contained in:
@@ -866,8 +866,16 @@ export namespace Provider {
|
||||
providers[providerID] = mergeDeep(existing, provider)
|
||||
return
|
||||
}
|
||||
const match = database[providerID]
|
||||
if (!match) return
|
||||
const match =
|
||||
database[providerID] ??
|
||||
({
|
||||
id: providerID,
|
||||
name: providerID,
|
||||
source: "custom",
|
||||
env: [],
|
||||
options: {},
|
||||
models: {},
|
||||
} satisfies Info)
|
||||
// @ts-expect-error
|
||||
providers[providerID] = mergeDeep(match, provider)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user