Skip to content

thinking is enabled but reasoning_content is missing in assistant tool call message at index ... #25758

Closed as not planned

Description

@jc01rho

Description

using 1.14.33, TUI, with opencode go, kimi-2.6 and deepseek-v4-pro,

kimi

Server: cloudflare\n\nBody:\n{\"error\":{\"message\":\"Error from provider: Provider returned error\",\"code\":400,\"metadata\":{\"raw\":\"{\\\"error\\\":{\\\"message\\\":\\\"thinking is enabled but reasoning_content is missing in assistant tool call message at index 13\\\",\\\"type\\\":\\\"invalid_request_error\\\"}}\",\"provider_name\":\"Moonshot AI\",\"is_byok\":true}},\"user_id\":\"user_2z4xm5LomaIHfsnVqMhFsWrVrGY\"}

deepseek

Server: cloudflare\n\nBody:\n{\"error\":{\"message\":\"Error from provider (DeepSeek): The `reasoning_content` in the thinking mode must be passed back to the API.\",\"type\":\"invalid_request_error\",\"param\":null,\"code\":\"invalid_request_error\"}}\n"

i think releated with
#24722
#23887

Plugins

omo

OpenCode version

1.14.33

Steps to reproduce

hard to reproduce it. sorry.

Screenshot and/or share link

No response

Operating System

windows 11, wsl ubuntu24

Terminal

windows terminal

Activity

  1. github-actions commented on May 4, 2026

    @github-actions
    Contributor

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

  2. jc01rho commented on May 4, 2026

    @jc01rho
    Author

    just read #24442, With using custom provider, with options.interleaved.field : "reasoning_content" , not a openroter, this is opencode go

  3. rekram1-node commented on May 4, 2026

    @rekram1-node
    Collaborator

    Send me a session plz: opencode export > session.json

    This is a command to run this is NOT /export.

  4. jc01rho commented on May 5, 2026

    @jc01rho
    Author

    I cannot find specific session, cuz too many subagent session are listed :(

    anyway I've trying workaround refer from https://github.com/router-for-me/CLIProxyAPI/blob/da6c599efd8da34d23d3668371fbb5ac70399e9d/internal/runtime/executor/kimi_executor.go#L326 , in testing

  5. jc01rho commented on May 5, 2026

    @jc01rho
    Author

    I cannot find specific session, cuz too many subagent session are listed :(

    anyway I've trying workaround refer from https://github.com/router-for-me/CLIProxyAPI/blob/da6c599efd8da34d23d3668371fbb5ac70399e9d/internal/runtime/executor/kimi_executor.go#L326 , in testing

    after applied this, works good so far.

  6. Suknna commented on May 5, 2026

    @Suknna

    I am encountering the exact same API error when using the kimi-for-coding (k2p6) model.

    It seems the OpenCode adapter is dropping the reasoning_content field from previous tool call messages when constructing the payload for the Kimi API.

    Here is the error context exported from my session:

    session.json

  7. Suknna commented on May 5, 2026

    @Suknna
  8. Suknna commented on May 5, 2026

    @Suknna

    "I found that disabling OpenCode's native compaction and removing the @cortexkit/opencode-magic-context plugin completely resolves the reasoning_content is missing error for the Kimi k2.6 model, which strongly suggests the context pruning logic is improperly stripping reasoning fields from historical tool-call messages."

  9. ualtinok commented on May 6, 2026

    @ualtinok
    Contributor

    "I found that disabling OpenCode's native compaction and removing the @cortexkit/opencode-magic-context plugin completely resolves the reasoning_content is missing error for the Kimi k2.6 model, which strongly suggests the context pruning logic is improperly stripping reasoning fields from historical tool-call messages."

    Magic-context issue fixed in 0.17.1
    https://github.com/cortexkit/magic-context/releases/tag/v0.17.1

  10. WanderWang commented on May 11, 2026

    @WanderWang

    +1 on this — seeing the same with Kimi K2.6 on 1.14.48. Multi-turn runs with tool calls eventually hit the "thinking is enabled but reasoning_content is missing" error and then it loops forever. No workaround I have tried (disabling compaction, tweaking temperature, etc.) fully fixes it. This is basically blocking me from using Kimi with OpenCode at this point. Would love to see this prioritized — happy to help test any fix.

  11. WanderWang commented on May 11, 2026

    @WanderWang

    @rekram1-node @thdxr — just saw that @ryanl-cerebras opened #26763 for the Cerebras-specific fix on the same reasoning_content replay problem. Any chance a similar provider-specific fix could be done for the Kimi/Moonshot path? This has been blocking Kimi users for weeks and there are already a few PRs in the queue (#24289, #25011, #25066) that try to address it but have not been reviewed yet. Happy to help test whatever approach the team prefers.

  12. karneaud commented on May 18, 2026

    @karneaud

    +1 for Provider Groq Running compound compound mini models

    'messages.2' : for 'role:assistant' the following must be satisfied[('messages.2' : property 'reasoning_content' is unsupported)]

  13. Frankstar commented on Jun 11, 2026

    @Frankstar

    still a problem with kimi K2.6 on 1.17.3

  14. github-actions commented on Aug 11, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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