mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-23 04:26:05 +00:00
core: fix provider options being overwritten when configured from multiple sources
This commit is contained in:
parent
19c3b25bea
commit
9c898cd958
1 changed files with 5 additions and 5 deletions
|
|
@ -479,16 +479,16 @@ export namespace Provider {
|
|||
}
|
||||
|
||||
function mergeProvider(providerID: string, provider: Partial<Info>) {
|
||||
const match = database[providerID]
|
||||
if (!match) return
|
||||
const existing = providers[providerID]
|
||||
if (existing) {
|
||||
// @ts-expect-error
|
||||
providers[providerID] = mergeDeep(existing, provider)
|
||||
} else {
|
||||
// @ts-expect-error
|
||||
providers[providerID] = mergeDeep(match, provider)
|
||||
return
|
||||
}
|
||||
const match = database[providerID]
|
||||
if (!match) return
|
||||
// @ts-expect-error
|
||||
providers[providerID] = mergeDeep(match, provider)
|
||||
}
|
||||
|
||||
// extend database from config
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue