mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-31 21:50:53 +00:00
core: add provider test coverage for upcoming refactor
Add comprehensive test suite for Provider module to ensure safe refactoring of provider internals. Tests cover: - Provider loading from env vars and config - Provider filtering (disabled_providers, enabled_providers) - Model whitelist/blacklist - Model aliasing and custom providers - getModel, getProvider, closest, defaultModel functions Also adds Env module for instance-scoped environment variable access, enabling isolated test environments without global state pollution.
This commit is contained in:
parent
7a4aa68706
commit
ee4437ff32
4 changed files with 1805 additions and 11 deletions
1729
packages/opencode/test/provider/provider.test.ts
Normal file
1729
packages/opencode/test/provider/provider.test.ts
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue