fix(core): preserve unconfigured console models
This commit is contained in:
parent
bba74985ab
commit
f4afb2c0a5
2 changed files with 1 additions and 6 deletions
|
|
@ -118,11 +118,6 @@ export const OpencodePlugin = define<HttpClient.HttpClient | EventV2.Service | S
|
|||
Object.assign(provider.request.body, withoutCredentials(item.options))
|
||||
})
|
||||
|
||||
const modelIDs = new Set(Object.keys(item.models ?? {}))
|
||||
for (const model of catalog.provider.get(providerID)?.models.values() ?? []) {
|
||||
if (!modelIDs.has(model.id)) catalog.model.remove(providerID, model.id)
|
||||
}
|
||||
|
||||
for (const [modelID, config] of Object.entries(item.models ?? {})) {
|
||||
catalog.model.update(providerID, modelID, (model) => {
|
||||
if (config.family !== undefined) model.family = config.family
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue