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
[Bug] OpenCode Go: kimi-k2.6 fails with HTTP 400 'cannot specify both thinking and reasoning_effort' — works via plain client #38329
Every call to opencode-go/kimi-k2.6 fails with HTTP 400:
{"error": {"message": "Error from provider: cannot specify both 'thinking' and 'reasoning_effort'"}}
The client sends Moonshot's native thinking toggle together with top-level reasoning_effort, and the upstream rejects requests containing both. kimi-k3 on the same Go subscription works fine — it got the same class of fixes via models.dev#3331 (see #37552), but K2.6 never got that pass, even though it's still a paid model in the Go catalog.
One data point that shows the upstream itself is fine: a plain OpenAI-compatible client (sends only model + messages + token limits, no thinking/reasoning_effort/temperature/tools) hits the same endpoint https://opencode.ai/zen/go/v1/chat/completions with kimi-k2.6 and the same API key, and gets 200. So this is about the request envelope opencode builds for K2.6, not a model or gateway outage.
Related: #37771 (K2.6 also affected by the mcp/system field rejection), #27054, #38219.
Happy to test any patch.
Plugins
None
OpenCode version
N/A — reproduced via direct API calls to the Go endpoint
Steps to reproduce
opencode run -m opencode-go/kimi-k2.6 "hello" → HTTP 400 cannot specify both 'thinking' and 'reasoning_effort'
opencode run -m opencode-go/kimi-k3 "hello" → works
Direct call to https://opencode.ai/zen/go/v1/chat/completions with a minimal payload (model, messages only) for kimi-k2.6 → 200
The issue does not use one of the three required templates (Bug Report, Feature Request, or Question). Please resubmit using the appropriate template.
The description appears to be AI-generated. We do not accept AI-generated walls of text — please describe the problem in your own words with the essential details only.
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
changed the title [-]OpenCode Go: kimi-k2.6 returns HTTP 400 (thinking/reasoning_effort conflict) while kimi-k3 works — K3 fixes never ported to K2.6[/-][+][Bug] OpenCode Go: kimi-k2.6 fails with HTTP 400 'cannot specify both thinking and reasoning_effort' — works via plain client[/+]on Jul 22, 2026
Thanks for updating the issue! It now looks good — the description is clear and specific, steps to reproduce are provided, and the required fields are filled in. We'll take a look.
The successful minimal direct API request only establishes that the endpoint accepts a minimal payload; it does not reproduce the alleged OpenCode request envelope. The report also omits the OpenCode version and the actual failing outbound JSON.
If this still occurs, please provide the exact OpenCode version or commit, complete command, selected variant, relevant model/provider configuration or overrides, and the sanitized exact outbound JSON body (with credentials and private content removed). We can reopen once there is an exact reproduction.
Activity
github-actions commentedon Jul 22, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
mcp/systemfield rejection described here)If you believe this was flagged incorrectly, please let a maintainer know.
[-]OpenCode Go: kimi-k2.6 returns HTTP 400 (thinking/reasoning_effort conflict) while kimi-k3 works — K3 fixes never ported to K2.6[/-][+][Bug] OpenCode Go: kimi-k2.6 fails with HTTP 400 'cannot specify both thinking and reasoning_effort' — works via plain client[/+]github-actions commentedon Jul 22, 2026
Thanks for updating the issue! It now looks good — the description is clear and specific, steps to reproduce are provided, and the required fields are filled in. We'll take a look.
opencode-agent commentedon Jul 23, 2026
Closing as unable to reproduce on current
dev(743f6410f2e5002723fc5e893039ac49fbfe0de8).This cannot happen out of the box with the current model definition and request transforms:
kimi-k2.6has no configured reasoning options, so it does not generate areasoningEffortvariant: https://github.com/anomalyco/opencode/blob/743f6410f2e5002723fc5e893039ac49fbfe0de8/packages/opencode/test/tool/fixtures/models-api.json#L34133-L34141effortoption:opencode/packages/opencode/src/provider/transform.ts
Lines 1635 to 1640 in 743f641
thinkinginjection is guarded to Anthropic-compatible transports, which this model is not using:opencode/packages/opencode/src/provider/transform.ts
Lines 1217 to 1226 in 743f641
The successful minimal direct API request only establishes that the endpoint accepts a minimal payload; it does not reproduce the alleged OpenCode request envelope. The report also omits the OpenCode version and the actual failing outbound JSON.
If this still occurs, please provide the exact OpenCode version or commit, complete command, selected variant, relevant model/provider configuration or overrides, and the sanitized exact outbound JSON body (with credentials and private content removed). We can reopen once there is an exact reproduction.