fix(opencode): allow empty provider config default (#34167)
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
This commit is contained in:
parent
225a1fbf35
commit
9903abc704
2 changed files with 13 additions and 1 deletions
|
|
@ -356,6 +356,17 @@ it.instance(
|
|||
{ config: { model: "anthropic/claude-sonnet-4-20250514" } },
|
||||
)
|
||||
|
||||
it.instance(
|
||||
"defaultModel treats empty provider config as no allowlist",
|
||||
Effect.gen(function* () {
|
||||
yield* setProcessEnv("ANTHROPIC_API_KEY", "test-api-key")
|
||||
const model = yield* Provider.use.defaultModel()
|
||||
expect(model.providerID).toBeDefined()
|
||||
expect(model.modelID).toBeDefined()
|
||||
}),
|
||||
{ config: { provider: {} } },
|
||||
)
|
||||
|
||||
it.instance(
|
||||
"defaultModel returns a typed error when config excludes every provider",
|
||||
Effect.gen(function* () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue