You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Support custom API parameter passthrough in variants for custom providers #27462
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Background:
When configuring a custom provider using @ai-sdk/openai-compatible (e.g., Zhipu AI, DeepSeek, Moonshot/Kimi), the variants field in the model configuration does not pass custom parameters through to the API request body.
The variant dropdown correctly shows Think and Fast options in the UI, but checking the API request logs reveals that the thinking parameter is not included in the request body sent to the provider's API.
Custom properties like thinking are silently ignored since they are not recognized by the schema.
Built-in providers (OpenAI, Anthropic, Google) work correctly because opencode has hardcoded variant-to-parameter mapping logic for them. Custom providers using @ai-sdk/openai-compatible lack this mapping.
Related issues: #9397 (DeepSeek thinking bug), #25001 (Kimi thinking ignored), #6768 (CoT not retrieved despite thinkmode config). Note: these issues report specific model bugs, whereas this request addresses the systemic schema limitation for all custom providers.
Suggested enhancement:
Allow each variant to carry an options (or body / providerOptions) field that gets merged into the API request body when that variant is selected. Example:
Activity
github-actions commentedon Jul 14, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.