opencode
opencode copied to clipboard
feat: add query parameter support for OpenAI-compatible providers
Summary
Adds a queryParams option to OpenaiCompatibleProviderSettings that appends query parameters to all API requests.
- Added
queryParams?: Record<string, string>to provider settings - Created
getUrlhelper to construct URLs with query params - Added integration tests for the new functionality
Fixes #7198
Test plan
- [x] Added integration tests for providers with queryParams
- [x] Verified providers without queryParams still work
- [x] Ran
bun test test/provider/openai-compatible.test.ts- all pass