Repository navigation
reasoningEffort still dropped for custom @ai-sdk/openai provider on v1.17.11 (same as closed #20815) #41294
Description
What goes wrong
With a custom provider that uses @ai-sdk/openai, the reasoning options set in
opencode.json never get into the request body. There is no reasoning field
at all in what goes out. Other options from the same config do go out fine
(include, temperature, top_p).
This is the same picture as #20815 (closed, marked v1.3.4–v1.3.13), which says
"other options like textVerbosity and include function correctly, the
reasoning-specific parameters are silently dropped". I see the same thing on
v1.17.11.
How I checked
I put a small local server in place of the real API. It writes down the request
body and answers 500. Then I pointed baseURL at it and ran opencode.
This is the full body that went out for the main request, with
opencode run --variant xhigh:
{
"model": "muse-spark-1.2-contributor",
"temperature": 0.6,
"top_p": 0.9,
"max_output_tokens": 32000,
"store": false,
"include": ["reasoning.encrypted_content"],
"tool_choice": "auto",
"stream": true
}include is there. reasoning is not. reasoningSummary is not there either.
Places I put the option — all three give the same body
- Model level:
provider.<name>.models.<id>.options.reasoningEffort - Provider level:
provider.<name>.options.reasoningEffort - Agent level:
agent.build.options.reasoningEffort
Picking a level in the UI makes no difference either. The desktop app offers
Default / Minimal / Low / Medium / High / Xhigh, and opencode run --variant <name> takes the same names, but the body is the same in every case.
Check against the real API
Same question, same model, real endpoint, reasoning tokens as counted by
opencode itself:
| variant | reasoning tokens |
|---|---|
| minimal | 3964 / 1188 / 2543 |
| xhigh | 3218 / 2985 |
The two groups sit on top of each other, and the highest count of all came from
minimal. So the level truly has no effect — this is not only about the body.
Config used (key taken out)
{
"provider": {
"meta": {
"name": "Meta AI",
"npm": "@ai-sdk/openai",
"options": {
"baseURL": "https://api.meta.ai/v1",
"apiKey": "<taken out>"
},
"models": {
"muse-spark-1.2-contributor": {
"name": "Muse Spark 1.2 Contributor",
"reasoning": true,
"tool_call": true,
"temperature": true,
"options": {
"reasoningEffort": "high",
"reasoningSummary": "auto",
"include": ["reasoning.encrypted_content"]
}
}
}
}
}
}What I would expect
reasoning: { "effort": ... } in the request body, from any one of those three
places, and from the variant picker.
Notes
- Adding
reasoning_optionsto the model inopencode.jsondoes not change the
list in the picker, and does not change the body. - [FEATURE]:关于reasoningEffort无法生效的临时解决方案 #26495 gives a workaround, but it needs a change to
transform.ts, so it is
no help for the packaged app. - Near to this: [BUG] options.reasoningEffort not passed to API calls for custom @ai-sdk/openai provider #20815 (closed), [BUG] Model
options(reasoning/thinking) not forwarded to API for@ai-sdk/openai-compatibleproviders in headless mode #27361, openai-compatible provideroptionssilently dropped if provider name contains dot #23622, Azure provider: reasoningEffort model option silently ignored #20275, [FEATURE]: expose provider-specific reasoning/thinking field schemas for custom models #33013.
Version
opencode 1.17.11, macOS 25.6.0 (Apple silicon), desktop app and CLI both.
Activity
github-actions commentedon Aug 8, 2026
This issue might be a duplicate of existing issues. Please check:
reasoningEffort/reasoningSummarydropped for custom@ai-sdk/openaiprovider (closed, but you note it still reproduces on v1.17.11)options(reasoning/thinking) not forwarded to API for@ai-sdk/openai-compatibleproviders in headless mode #27361: Open issue — modeloptions(reasoning/thinking) not forwarded to API for@ai-sdk/openai-compatibleproviders, same symptomIf #27361 covers your case, consider adding your findings there (especially the intercept results and the variant-picker confirmation that effort truly has no effect). If this is a distinct regression or a different code path, the extra detail you've provided here is valuable on its own.
opencode-agent commentedon Aug 9, 2026
Thanks for the detailed report. This was fixed by #34702, which added
forceReasoninghandling for custom@ai-sdk/openaimodels and included coverage for this Meta/Muse setup.The fix first shipped in v1.17.13; v1.17.11 predates it. Please upgrade to the latest release.