feat(core): flatten provider config and load native packages (#35563)

Co-authored-by: Dax Raad <d@ironbay.co>
This commit is contained in:
Shoubhit Dash
2026-07-06 16:18:56 -04:00
committed by GitHub
co-authored by Dax Raad
parent d603eed5a1
commit e57d9ca390
107 changed files with 2596 additions and 1987 deletions
@@ -41,7 +41,8 @@ describe("PerplexityPlugin", () => {
const result = yield* aisdk.runSDK({
model: ModelV2.Info.make({
...ModelV2.Info.empty(ProviderV2.ID.make("perplexity"), ModelV2.ID.make("sonar")),
api: { id: ModelV2.ID.make("sonar"), type: "aisdk", package: "test-provider" },
modelID: ModelV2.ID.make("sonar"),
package: "aisdk:test-provider",
}),
package: "@ai-sdk/perplexity",
options: { name: "perplexity" },
@@ -58,7 +59,8 @@ describe("PerplexityPlugin", () => {
const result = yield* aisdk.runSDK({
model: ModelV2.Info.make({
...ModelV2.Info.empty(ProviderV2.ID.make("perplexity"), ModelV2.ID.make("sonar")),
api: { id: ModelV2.ID.make("sonar"), type: "aisdk", package: "test-provider" },
modelID: ModelV2.ID.make("sonar"),
package: "aisdk:test-provider",
}),
package: "@ai-sdk/perplexity-compatible",
options: { name: "perplexity" },
@@ -75,7 +77,8 @@ describe("PerplexityPlugin", () => {
const result = yield* aisdk.runSDK({
model: ModelV2.Info.make({
...ModelV2.Info.empty(ProviderV2.ID.make("perplexity"), ModelV2.ID.make("sonar")),
api: { id: ModelV2.ID.make("sonar"), type: "aisdk", package: "test-provider" },
modelID: ModelV2.ID.make("sonar"),
package: "aisdk:test-provider",
}),
package: "@ai-sdk/perplexity",
options: { name: "perplexity" },
@@ -92,7 +95,8 @@ describe("PerplexityPlugin", () => {
const result = yield* aisdk.runSDK({
model: ModelV2.Info.make({
...ModelV2.Info.empty(ProviderV2.ID.make("custom-perplexity"), ModelV2.ID.make("sonar")),
api: { id: ModelV2.ID.make("sonar"), type: "aisdk", package: "test-provider" },
modelID: ModelV2.ID.make("sonar"),
package: "aisdk:test-provider",
}),
package: "@ai-sdk/perplexity",
options: { name: "custom-perplexity" },
@@ -110,7 +114,8 @@ describe("PerplexityPlugin", () => {
const result = yield* aisdk.runLanguage({
model: ModelV2.Info.make({
...ModelV2.Info.empty(ProviderV2.ID.make("perplexity"), ModelV2.ID.make("alias")),
api: { id: ModelV2.ID.make("sonar"), type: "aisdk", package: "test-provider" },
modelID: ModelV2.ID.make("sonar"),
package: "aisdk:test-provider",
}),
sdk: fakeSelectorSdk(calls),
options: {},