fix: ensure that plugins can register providers with config changes

fix-plugin-provider-behavior
Aiden Cline 2026-03-20 00:36:00 -05:00
parent d460614cd7
commit 97799f347e
1 changed files with 10 additions and 2 deletions

View File

@ -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)
}