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

This commit is contained in:
Dax
2026-06-03 17:32:58 +00:00
committed by GitHub
parent 7f8412ec3e
commit 1520b0de20
57 changed files with 825 additions and 686 deletions
@@ -25,12 +25,12 @@ describe("GoogleVertexAnthropicPlugin", () => {
const transform = yield* catalog.transform()
yield* transform((catalog) =>
catalog.provider.update(ProviderV2.ID.make("google-vertex-anthropic"), (provider) => {
provider.endpoint = { type: "aisdk", package: "@ai-sdk/google-vertex/anthropic" }
provider.api = { type: "aisdk", package: "@ai-sdk/google-vertex/anthropic" }
}),
)
const provider = yield* catalog.provider.get(ProviderV2.ID.make("google-vertex-anthropic"))
expect(provider.options.aisdk.provider.project).toBe("cloud-project")
expect(provider.options.aisdk.provider.location).toBe("cloud-location")
expect(provider.request.body.project).toBe("cloud-project")
expect(provider.request.body.location).toBe("cloud-location")
}),
),
)
@@ -44,14 +44,14 @@ describe("GoogleVertexAnthropicPlugin", () => {
const transform = yield* catalog.transform()
yield* transform((catalog) =>
catalog.provider.update(ProviderV2.ID.make("google-vertex-anthropic"), (provider) => {
provider.endpoint = { type: "aisdk", package: "@ai-sdk/google-vertex/anthropic" }
provider.options.aisdk.provider.project = "configured-project"
provider.options.aisdk.provider.location = "configured-location"
provider.api = { type: "aisdk", package: "@ai-sdk/google-vertex/anthropic" }
provider.request.body.project = "configured-project"
provider.request.body.location = "configured-location"
}),
)
const provider = yield* catalog.provider.get(ProviderV2.ID.make("google-vertex-anthropic"))
expect(provider.options.aisdk.provider.project).toBe("configured-project")
expect(provider.options.aisdk.provider.location).toBe("configured-location")
expect(provider.request.body.project).toBe("configured-project")
expect(provider.request.body.location).toBe("configured-location")
}),
),
)