refactor(core): remove ai sdk option fields (#30581)

This commit is contained in:
Dax 2026-06-03 13:32:58 -04:00 committed by GitHub
commit 1520b0de20
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
57 changed files with 825 additions and 686 deletions

View file

@ -43,10 +43,6 @@ function variants(model: ModelsDev.Model) {
id: ModelV2.VariantID.make(id),
headers: { ...(item.provider?.headers ?? {}) },
body: { ...(item.provider?.body ?? {}) },
aisdk: {
provider: {},
request: {},
},
}))
}
@ -66,14 +62,16 @@ export const ModelsDevPlugin = PluginV2.define({
catalog.provider.update(providerID, (provider) => {
provider.name = item.name
provider.env = [...item.env]
provider.endpoint = item.npm
provider.api = item.npm
? {
type: "aisdk",
package: item.npm,
url: item.api,
}
: {
type: "unknown",
type: "native",
url: item.api,
settings: {},
}
})
@ -82,14 +80,16 @@ export const ModelsDevPlugin = PluginV2.define({
catalog.model.update(providerID, modelID, (draft) => {
draft.name = model.name
draft.family = model.family ? ModelV2.Family.make(model.family) : undefined
draft.endpoint = model.provider?.npm
draft.api = model.provider?.npm
? {
type: "aisdk",
package: model.provider?.npm,
url: model.provider.api,
}
: {
type: "unknown",
type: "native",
url: model.provider?.api,
settings: {},
}
draft.capabilities = {
tools: model.tool_call,