refactor(schema): extract shared public schemas (#33571)

This commit is contained in:
Kit Langton
2026-06-23 22:31:06 -04:00
committed by GitHub
parent 60aba622ab
commit 516cfe4e09
130 changed files with 2004 additions and 1583 deletions
@@ -25,7 +25,7 @@ describe("OpenAICompatiblePlugin", () => {
const aisdk = yield* AISDK.Service
yield* addPlugin()
const defaulted = yield* aisdk.runSDK({
model: new ModelV2.Info({
model: ModelV2.Info.make({
...ModelV2.Info.empty(ProviderV2.ID.make("custom"), ModelV2.ID.make("model")),
api: { id: ModelV2.ID.make("model"), type: "aisdk", package: "test-provider" },
}),
@@ -33,7 +33,7 @@ describe("OpenAICompatiblePlugin", () => {
options: { name: "custom" },
})
const disabled = yield* aisdk.runSDK({
model: new ModelV2.Info({
model: ModelV2.Info.make({
...ModelV2.Info.empty(ProviderV2.ID.make("custom"), ModelV2.ID.make("model")),
api: { id: ModelV2.ID.make("model"), type: "aisdk", package: "test-provider" },
}),
@@ -51,7 +51,7 @@ describe("OpenAICompatiblePlugin", () => {
const aisdk = yield* AISDK.Service
yield* addPlugin()
const result = yield* aisdk.runSDK({
model: new ModelV2.Info({
model: ModelV2.Info.make({
...ModelV2.Info.empty(ProviderV2.ID.make("custom"), ModelV2.ID.make("model")),
api: { id: ModelV2.ID.make("model"), type: "aisdk", package: "test-provider" },
}),
@@ -74,7 +74,7 @@ describe("OpenAICompatiblePlugin", () => {
}),
)
yield* aisdk.runSDK({
model: new ModelV2.Info({
model: ModelV2.Info.make({
...ModelV2.Info.empty(ProviderV2.ID.make("custom-provider"), ModelV2.ID.make("model")),
api: { id: ModelV2.ID.make("model"), type: "aisdk", package: "test-provider" },
}),
@@ -94,7 +94,7 @@ describe("OpenAICompatiblePlugin", () => {
})
yield* addPlugin()
const result = yield* aisdk.runSDK({
model: new ModelV2.Info({
model: ModelV2.Info.make({
...ModelV2.Info.empty(ProviderV2.ID.make("cloudflare-workers-ai"), ModelV2.ID.make("model")),
api: { id: ModelV2.ID.make("model"), type: "aisdk", package: "test-provider" },
}),