refactor(core): migrate provider consumers

This commit is contained in:
Dax Raad 2026-06-24 13:00:46 -04:00 committed by Shoubhit Dash
commit 248db536e2
71 changed files with 1313 additions and 1138 deletions

View file

@ -56,7 +56,9 @@ describe("CoherePlugin", () => {
const ignored = yield* aisdk.runSDK({
model: ModelV2.Info.make({
...ModelV2.Info.empty(ProviderV2.ID.make("cohere"), ModelV2.ID.make("command")),
api: { id: ModelV2.ID.make("command"), type: "aisdk", package: "test-provider" },
modelID: ModelV2.ID.make("command"),
aisdk: true,
package: "test-provider",
}),
package: "@ai-sdk/openai-compatible",
options: { name: "cohere" },
@ -66,7 +68,9 @@ describe("CoherePlugin", () => {
const result = yield* aisdk.runSDK({
model: ModelV2.Info.make({
...ModelV2.Info.empty(ProviderV2.ID.make("cohere"), ModelV2.ID.make("command")),
api: { id: ModelV2.ID.make("command"), type: "aisdk", package: "test-provider" },
modelID: ModelV2.ID.make("command"),
aisdk: true,
package: "test-provider",
}),
package: "@ai-sdk/cohere",
options: { name: "cohere" },
@ -83,7 +87,9 @@ describe("CoherePlugin", () => {
const result = yield* aisdk.runSDK({
model: ModelV2.Info.make({
...ModelV2.Info.empty(ProviderV2.ID.make("custom-cohere"), ModelV2.ID.make("command-r-plus")),
api: { id: ModelV2.ID.make("command-r-plus"), type: "aisdk", package: "test-provider" },
modelID: ModelV2.ID.make("command-r-plus"),
aisdk: true,
package: "test-provider",
}),
package: "@ai-sdk/cohere",
options: { name: "custom-cohere", apiKey: "test", baseURL: "https://cohere.example" },
@ -108,7 +114,9 @@ describe("CoherePlugin", () => {
const result = yield* aisdk.runLanguage({
model: ModelV2.Info.make({
...ModelV2.Info.empty(ProviderV2.ID.make("cohere"), ModelV2.ID.make("alias")),
api: { id: ModelV2.ID.make("command-r-plus"), type: "aisdk", package: "test-provider" },
modelID: ModelV2.ID.make("command-r-plus"),
aisdk: true,
package: "test-provider",
}),
sdk,
options: {},