mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-03-26 07:36:46 +08:00
Add OpenCode-specific configuration structures for the AI SDK format:
- OpenCodeProviderConfig: Main config with npm package, options, and models
- OpenCodeProviderOptions: baseURL, apiKey, and headers support
- OpenCodeModel: Model definition with name and token limits
- OpenCodeModelLimit: Context and output token limits
Key features:
- Supports environment variable references (e.g., "{env:API_KEY}")
- Custom headers support for specialized providers
- Model-level token limits for context management
- Helper methods for parsing and validation