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

This commit is contained in:
Dax
2026-06-03 14:11:38 -04:00
committed by GitHub
parent af6383485b
commit 11dbd15812
35 changed files with 129 additions and 79 deletions
+8 -1
View File
@@ -61,12 +61,18 @@ describe("CatalogV2", () => {
}
})
catalog.model.update(providerID, modelID, (model) => {
model.api = { type: "aisdk", package: "@ai-sdk/openai-compatible", url: "https://model.example.com" }
model.api = {
id: modelID,
type: "aisdk",
package: "@ai-sdk/openai-compatible",
url: "https://model.example.com",
}
model.request.body.baseURL = "https://override.example.com"
})
})
expect((yield* catalog.model.get(providerID, modelID)).api).toEqual({
id: modelID,
type: "aisdk",
package: "@ai-sdk/openai-compatible",
url: "https://override.example.com",
@@ -94,6 +100,7 @@ describe("CatalogV2", () => {
})
expect((yield* catalog.model.get(providerID, modelID)).api).toEqual({
id: modelID,
type: "aisdk",
package: "@ai-sdk/openai-compatible",
url: "https://provider.example.com",