-
Notifications
You must be signed in to change notification settings - Fork 15.1k
[BUG] options.reasoningEffort not passed to API calls for custom @ai-sdk/openai provider #20815
Description
Description
Starting from v1.3.4, options.reasoningEffort plus options.reasoningSummary, and by extension variants.<name>.reasoningEffort plus variants.<name>.reasoningSummary, configured in opencode.json is no longer passed on to API calls when @ai-sdk/openai provider is used as the NPM SDK for a custom provider. The option still works with v1.3.3, so I believe this regression is introduced with the move to AI SDK v6.
The documentation for the OpenAI SDK supports the use of reasoningEffort and reasoningSummary: docs here. This effectively make GPT 5.4 and GPT 5.3 Codex on custom provider mostly unusable.
Plugins
No response
OpenCode version
1.3.13, but this regression appears first on 1.3.4 and forward.
Steps to reproduce
- Create a custom provider in config against a custom Responses API compatible provider. Example:
- Make a simple request in OpenCode with either model.
- Intercept and inspect the request body
Expect: Reasoning effort and summary is included in the request body as below.
{
...
"reasoning": {
"effort": "high",
"summary": "auto"
},
...
}Observed: "reasoning" is not added into the request body -> bug.
Screenshot and/or share link
reasoningEffort and reasoningSummary usage docs here
Operating System
Linux
Terminal
No response
{ "provider": { "my_provider": { "my_model": { "npm": "@ai-sdk/openai provider", "name": "My Custom Provider", "options": { "baseURL": "https://custom-openai-compatible-url/v1", "apiKey": "sk-my-api-key" }, "models": { "gpt-5.3-codex": { "name": "gpt-5.3-codex", "options": { "include": ["reasoning.encrypted_content"], // included in request body "reasoningEffort": "high", // NOT included in request body "reasoningSummary": "auto", // NOT included in request body "textVerbosity": "medium" // included in request body } }, "gpt-5.4": { "name": "gpt-5.3-codex", "options": { "include": ["reasoning.encrypted_content"] // included in request body }, "variants": { "high": { "reasoningEffort": "high", // NOT included in request body "reasoningSummary": "auto", // NOT included in request body "textVerbosity": "medium" // included in request body } } } } } } } }