refactor(core): nest model api id (#30603)

This commit is contained in:
Dax 2026-06-03 14:11:38 -04:00 committed by GitHub
commit 11dbd15812
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
35 changed files with 129 additions and 79 deletions

View file

@ -32,10 +32,9 @@ export const Plugin = PluginV2.define({
for (const [id, config] of Object.entries(item.models ?? {})) {
catalog.model.update(providerID, ModelV2.ID.make(id), (model) => {
if (config.api_id !== undefined) model.apiID = config.api_id
if (config.family !== undefined) model.family = config.family
if (config.name !== undefined) model.name = config.name
if (config.api !== undefined) model.api = { ...config.api }
if (config.api !== undefined) model.api = { ...model.api, ...config.api }
if (config.capabilities !== undefined) {
model.capabilities = {
tools: config.capabilities.tools,