Skip to content

[Bug] OpenCode Go: kimi-k2.6 fails with HTTP 400 'cannot specify both thinking and reasoning_effort' — works via plain client #38329

Closed as not planned

Description

@AlfieChang

Description

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

  1. opencode run -m opencode-go/kimi-k2.6 "hello" → HTTP 400 cannot specify both 'thinking' and 'reasoning_effort'
  2. opencode run -m opencode-go/kimi-k3 "hello" → works
  3. Direct call to https://opencode.ai/zen/go/v1/chat/completions with a minimal payload (model, messages only) for kimi-k2.6 → 200

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

Git Bash

Activity

  1. github-actions commented on Jul 22, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • 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:

    If you believe this was flagged incorrectly, please let a maintainer know.

  2. 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
  3. github-actions commented on Jul 22, 2026

    @github-actions
    Contributor

    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.

  4. opencode-agent commented on Jul 23, 2026

    @opencode-agent
    Contributor

    Closing as unable to reproduce on current dev (743f6410f2e5002723fc5e893039ac49fbfe0de8).

    This cannot happen out of the box with the current model definition and request transforms:

    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.

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