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
Provider request fails with invalid_request_error and OpenCode does not work #47975
OpenCode is not working when sending requests through the configured provider.
The request fails with the following error:
Error from provider (Console): Upstream request failed: [invalid_request_error] The request contains invalid parameters. Check the request body for any errors or inconsistencies.
Plugins
No plugins.
OpenCode version
1.18.29
Steps to reproduce
Open OpenCode.
Configure and select the affected provider and model.
Start a new conversation.
Send a message to the model.
The request fails with the following error:
Error from provider (Console): Upstream request failed: [invalid_request_error] The request contains invalid parameters. Check the request body for any errors or inconsistencies.
@crisalexmata I tried deleting all OpenCode data and sessions. It works temporarily, and starting a new session also works temporarily, but the issue eventually comes back. It seems to happen more often with long running sessions. I suspect OpenCode may be sending an incorrect API header or request configuration after the session has been running for a while. It may be worth checking whether provider state, API headers, or request configuration is being incorrectly persisted or reused.
Also, 1.18.30 seems to have the similar issue as #48297, which has already been reported.
Root cause found for this generic 400, at least for muse-spark-* on OpenCode Go / Zen.
The Console gateways advertise max as a supported reasoning effort but reject it upstream with exactly the generic message from this issue.
Minimal repro against https://opencode.ai/zen/go/v1/responses (no tools, no history, one message):
400 reasoning_effort 'none' is not supported for model 'muse-spark-1.3-contributor'. Supported values: [minimal, low, medium, high, xhigh, max]
effort: "max" returns exactly the message from this issue:
{"model":"muse-spark-1.3-contributor","error":{"param":null,"type":"invalid_request_error","message":"Error from provider (Console Go): Upstream request failed: [invalid_request_error] The request contains invalid parameters. Check the request body for any errors or inconsistencies."}}
So the validator lists max as supported but the request is still rejected — looks like a gateway/upstream bug on the top tier.
Why OpenCode users hit this: agent-level options.reasoningEffort is forwarded to whatever model is selected, so any agent that pins reasoningEffort: "max" (typically for another model) makes every muse-spark-* request fail on turn 1. Reproduced end-to-end on 1.18.31:
default build agent (options.reasoningEffort: max) + -m opencode-go/muse-spark-1.3-contributor → same 400 on the first message
same run with --variant xhigh → succeeds
same run with a dedicated agent using options.reasoningEffort: "xhigh" → succeeds
Workaround until fixed: for Muse Spark, use variant xhigh (or an agent configured with high/xhigh); never send effort: max to these models.
@rekram1-node I’m using OpenCode 1.18.31, but I’m still experiencing the same issue during long-running sessions when using OpenCode through Zed’s ACP integration.
This is specifically happening with the Zed ACP setup:
Definitely not "maliciously ignored" I didn't see any messages in here nor have I received reports of this personally so I am only just now seeing this.
I'll see if I can reproduce I think it's just Meta not giving a good error when the compaction limit is reached, would also say that the latest 2.0.30+ have some additional fixes for compaction should make it trigger a bit earlier, ill see if meta can give a better error if the context overflows.
if this isnt context related plz provide more info so I can reproduce
@rekram1-node This issue seems to occur with the Muse Spark 1.3 contributor (max) in long-running sessions. Creating a new session and running the AI agent again seems to work fine, but the issue appears after using the same session for an extended period. It also seems to occur with both ACP and the OpenCode CLI. However, the behavior may vary for others, so further investigation and information from other users would help identify the root cause.
Activity
crisalexmata commentedon Sep 10, 2026
This is also happening to me, switching between Muse Spark 1.3 Contributor (Go) and Muse Spark 1.3 Free will not fix it either.
muhammad-fiaz commentedon Sep 10, 2026
@crisalexmata I tried deleting all OpenCode data and sessions. It works temporarily, and starting a new session also works temporarily, but the issue eventually comes back. It seems to happen more often with long running sessions. I suspect OpenCode may be sending an incorrect API header or request configuration after the session has been running for a while. It may be worth checking whether provider state, API headers, or request configuration is being incorrectly persisted or reused.
Also,
1.18.30seems to have the similar issue as #48297, which has already been reported.AlfredWang777 commentedon Sep 17, 2026
Root cause found for this generic 400, at least for
muse-spark-*on OpenCode Go / Zen.The Console gateways advertise
maxas a supported reasoning effort but reject it upstream with exactly the generic message from this issue.Minimal repro against
https://opencode.ai/zen/go/v1/responses(no tools, no history, one message):Observed results:
reasoning.effortminimal(checked vianoneerror listing)highxhighmaxinvalid_request_error(see below)nonereasoning_effort 'none' is not supported for model 'muse-spark-1.3-contributor'. Supported values: [minimal, low, medium, high, xhigh, max]effort: "max"returns exactly the message from this issue:{"model":"muse-spark-1.3-contributor","error":{"param":null,"type":"invalid_request_error","message":"Error from provider (Console Go): Upstream request failed: [invalid_request_error] The request contains invalid parameters. Check the request body for any errors or inconsistencies."}}So the validator lists
maxas supported but the request is still rejected — looks like a gateway/upstream bug on the top tier.Why OpenCode users hit this: agent-level
options.reasoningEffortis forwarded to whatever model is selected, so any agent that pinsreasoningEffort: "max"(typically for another model) makes everymuse-spark-*request fail on turn 1. Reproduced end-to-end on 1.18.31:buildagent (options.reasoningEffort: max) +-m opencode-go/muse-spark-1.3-contributor→ same 400 on the first message--variant xhigh→ succeedsoptions.reasoningEffort: "xhigh"→ succeedsWorkaround until fixed: for Muse Spark, use variant
xhigh(or an agent configured withhigh/xhigh); never sendeffort: maxto these models.rekram1-node commentedon Sep 19, 2026
fixed in models.dev
muhammad-fiaz commentedon Sep 19, 2026
@rekram1-node does it work with current
opencoderelease version currently now??muhammad-fiaz commentedon Sep 19, 2026
@rekram1-node I’m using OpenCode
1.18.31, but I’m still experiencing the same issue during long-running sessions when using OpenCode through Zed’s ACP integration.This is specifically happening with the Zed ACP setup:
ayushch80 commentedon Sep 24, 2026
Issue still exists in OpenCode
1.18.32. And sometimes hitting this error in mid-conversations.Not-A-Normal-Robot commentedon Oct 3, 2026
Issue still exists in opencode v2.0.22 with muse spark 1.3 free
farrizdesignpro1339 commentedon Oct 3, 2026
just use /compat and normal again
ctlssr commentedon Oct 9, 2026
Best answer. Also happened to me at 97%, /compact solved it.
Not-A-Normal-Robot commentedon Oct 9, 2026
That's not a solution—that's a workaround. It only addresses the symptom and not the root cause.
Kauid323 commentedon Oct 10, 2026
Still error, especially model Muse Spark 1.3 has reached 910,000 context
in OpenCode 2.0.22 Desktop
opencode-debug-20261010T184344.zip
grilero commentedon Oct 13, 2026
Same here with 2.0.28 on muse spark 1.3 free
darman-a11y commentedon Oct 15, 2026
Crazy how many bugs get maliciously ignored
rekram1-node commentedon Oct 16, 2026
Definitely not "maliciously ignored" I didn't see any messages in here nor have I received reports of this personally so I am only just now seeing this.
I'll see if I can reproduce I think it's just Meta not giving a good error when the compaction limit is reached, would also say that the latest 2.0.30+ have some additional fixes for compaction should make it trigger a bit earlier, ill see if meta can give a better error if the context overflows.
if this isnt context related plz provide more info so I can reproduce
muhammad-fiaz commentedon Oct 16, 2026
@rekram1-node This issue seems to occur with the Muse Spark 1.3 contributor (max) in long-running sessions. Creating a new session and running the AI agent again seems to work fine, but the issue appears after using the same session for an extended period. It also seems to occur with both ACP and the OpenCode CLI. However, the behavior may vary for others, so further investigation and information from other users would help identify the root cause.