Skip to content

reasoningEffort still dropped for custom @ai-sdk/openai provider on v1.17.11 (same as closed #20815) #41294

Closed

Description

@coo1white

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

  1. Model level: provider.<name>.models.<id>.options.reasoningEffort
  2. Provider level: provider.<name>.options.reasoningEffort
  3. 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

Version

opencode 1.17.11, macOS 25.6.0 (Apple silicon), desktop app and CLI both.

Activity

  1. github-actions commented on Aug 8, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    If #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.

  2. opencode-agent commented on Aug 9, 2026

    @opencode-agent
    Contributor

    Thanks for the detailed report. This was fixed by #34702, which added forceReasoning handling for custom @ai-sdk/openai models 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions