opencode icon indicating copy to clipboard operation
opencode copied to clipboard

feat: add query parameter support for OpenAI-compatible providers

Open Awowen opened this issue 6 days ago • 1 comments

Summary

Adds a queryParams option to OpenaiCompatibleProviderSettings that appends query parameters to all API requests.

  • Added queryParams?: Record<string, string> to provider settings
  • Created getUrl helper 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

Awowen avatar Jan 08 '26 20:01 Awowen