fix(provider): type default model failures (#28881)

This commit is contained in:
Shoubhit Dash
2026-05-22 23:53:23 +05:30
committed by GitHub
parent 968aaa3cfe
commit 5f42351159
5 changed files with 60 additions and 9 deletions

View File

@@ -351,6 +351,16 @@ it.instance(
{ config: { model: "anthropic/claude-sonnet-4-20250514" } },
)
it.instance(
"defaultModel returns a typed error when config excludes every provider",
Effect.gen(function* () {
const error = yield* Provider.use.defaultModel().pipe(Effect.flip)
expect(error).toBeInstanceOf(Provider.NoProvidersError)
expect(error._tag).toBe("ProviderNoProvidersError")
}),
{ config: { enabled_providers: [] } },
)
it.instance(
"provider with baseURL from config",
Effect.gen(function* () {