opencode icon indicating copy to clipboard operation
opencode copied to clipboard

feat(config): provider requestOptions for request-level params

Open cyhhao opened this issue 1 day ago • 1 comments

Fixes #9028.

Context

  • store is a per-request OpenAI Responses option; putting it under generic provider.options (SDK init options) is awkward.
  • Introduce a clear separation:
    • provider.<id>.options: SDK init / transport settings (apiKey, baseURL, timeout, ...)
    • provider.<id>.requestOptions: default per-request model options applied to all models in that provider.

Changes

  • Add provider.<id>.requestOptions and plumb into ProviderTransform.options().
  • Apply requestOptions.store only for OpenAI providers (OpenAI still defaults to store=false).
  • Migration: if users had provider.<id>.options.store, it is moved to provider.<id>.requestOptions.store during config load.

Example

{
  "provider": {
    "openai": {
      "requestOptions": { "store": true }
    }
  }
}

cyhhao avatar Jan 17 '26 06:01 cyhhao