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
@@ -158,15 +158,14 @@ describe("DynamicProviderPlugin", () => {
}),
)
itWithAISDK.effect("uses the model apiID for the default language model", () =>
itWithAISDK.effect("uses the model api.id for the default language model", () =>
Effect.gen(function* () {
const plugin = yield* PluginV2.Service
const aisdk = yield* AISDK.Service
yield* plugin.add(dynamicPlugin())
const language = yield* aisdk.language(
model("custom", "alias", {
apiID: ModelV2.ID.make("test-model-api"),
api: { type: "aisdk", package: fixtureProvider },
api: { id: ModelV2.ID.make("test-model-api"), type: "aisdk", package: fixtureProvider },
}),
)
expect(language).toMatchObject({ modelID: "test-model-api", options: { name: "custom" } })