GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — DeepSeek V4 Pro (OpenRouter) reasoning_content error - v1.14.27 · Issue #24569 · anomalyco/opencode

DeepSeek V4 Pro (OpenRouter) reasoning_content error - v1.14.27 #24569

New issue
Copy link
New issue
Copy link
Closed
Closed
DeepSeek V4 Pro (OpenRouter) reasoning_content error - v1.14.27#24569
Copy link
Assignees
rekram1-node
Labels
bugSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)

Description

@077dwei
077dwei
opened on Apr 27, 2026
Issue body actions

Description

[DeepSeek] The reasoning_content in the thinking mode must be passed back to the API.

OpenCode version

v1.14.27 (latest)

Plugins

No response

OpenCode version

V1.14.27

Steps to reproduce

No response

Screenshot and/or share link

Image

Operating System

Debian GNU/Linux 13 (trixie) (6.12.74+deb13+1-amd64)

Terminal

No response

Reacted by d770, Audrius Sagadinas, syafinazri, Yuqiu, RedAtman, atomlab, Terry Wang, Max, Meher Hendi, art-n and 2 more

Activity

Next
  1. 077dwei
    added
    bugSomething isn't working
    on Apr 27, 2026
  2. github-actions
    assigned
    rekram1-node
    on Apr 27, 2026
  3. github-actions
    added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Apr 27, 2026
  4. github-actions commented on Apr 27, 2026

    @github-actions
    github-actionsBot
    on Apr 27, 2026 – with GitHub Actions
    Contributor
    More actions

    This issue might be a duplicate of several existing issues reporting the same reasoning_content error with DeepSeek thinking mode. Please check:

    • The bug requiring deepseek requests to include the thinking content still exists in versions 1.14.26 and 27. #24558: Same bug still present in v1.14.26 and v1.14.27
    • deepseek v4 provider error: The reasoning_content in the thinking mode must be passed back to the API #24497: DeepSeek V4 reasoning_content provider error (same error message)
    • DeepSeek V4: reasoning_content lost on second interleaved pass (regression from #24146) #24442: DeepSeek V4 reasoning_content lost on second interleaved pass (regression)
    • DeepSeek V4 400: The reasoning_content in the thinking mode must be passed back to the API. #24385: DeepSeek V4 400 error — same error message
    • Bug: DeepSeek reasoning_content not passed back in multi-turn conversations #24261: DeepSeek reasoning_content not passed back in multi-turn conversations
    • [DeepSeek] The reasoning_content in the thinking mode must be passed back to the API. #24188: [DeepSeek] The reasoning_content in the thinking mode must be passed back to the API
    • DeepSeek V4 Flash: reasoning_content must be passed back to API when using thinking mode #24130: DeepSeek V4 Flash — same reasoning_content error
    • The reasoning_content in the thinking mode must be passed back to the API. #24083: The reasoning_content in the thinking mode must be passed back to the API

    If your issue is the same, please consider adding a reaction or comment to one of the above instead of opening a new report.

  5. rekram1-node commented on Apr 27, 2026

    @rekram1-node
    rekram1-node
    on Apr 27, 2026
    Member
    More actions

    @077dwei please please provide a session demonstrating it:

    opencode export > session.json

    RUN THIS IN YOUR TERMINAL DO NOT USE /export

    And then send me the session dump.

    Reacted by d770
  6. Meepoljdx commented on Apr 27, 2026

    @Meepoljdx
    Meepoljdx
    on Apr 27, 2026
    More actions

    same issue @rekram1-node this is my session json

    session.json

    Reacted by d770
  7. 077dwei commented on Apr 27, 2026

    @077dwei
    077dwei
    on Apr 27, 2026
    Author
    More actions

    @rekram1-node

    session.json

    Trimmed session (only error-related part):

    Reacted by d770
  8. rekram1-node commented on Apr 27, 2026

    @rekram1-node
    rekram1-node
    on Apr 27, 2026
    Member
    More actions

    @Meepoljdx you are using something called:
    "providerID": "deepseek-plat",

    I need to see your provider config it's prolly missing interleaved settings

    Reacted by d770
  9. broaz27 commented on Apr 27, 2026

    @broaz27
    broaz27
    on Apr 27, 2026
    More actions

    I can't reproduce the issue anymore, but only in new sessions, im on deepseekv4 pro, provided by deepseek on openrouter, my interleaved settings are on their default "reasoning_content"

  10. rekram1-node commented on Apr 27, 2026

    @rekram1-node
    rekram1-node
    on Apr 27, 2026
    Member
    More actions

    @077dwei I can't have a trimmed session, I need your actual session otherwise it provides basically 0 value. If you need it secret use --sanitize

    The session you sent has 0 assistant messages so the error would be impossible

  11. 077dwei commented on Apr 27, 2026

    @077dwei
    077dwei
    on Apr 27, 2026
    Author
    More actions

    @rekram1-node Sorry for sending the trimmed version earlier. Here is the full session exported with --sanitize:

    session_sanitized.json

    Reacted by d770
  12. ngkhanhlinh2k4 commented on Apr 27, 2026

    @ngkhanhlinh2k4
    ngkhanhlinh2k4
    on Apr 27, 2026
    More actions

    me too, still error like that

  13. rekram1-node commented on Apr 27, 2026

    @rekram1-node
    rekram1-node
    on Apr 27, 2026
    Member
    More actions

    @ngkhanhlinh2k4 more info plz

  14. yujf commented on Apr 27, 2026

    @yujf
    yujf
    on Apr 27, 2026
    More actions

    session.json
    If a shell command is executed even once in the middle, a 400 error will occur.
    @rekram1-node

  15. 372572571 commented on Apr 27, 2026

    @372572571
    372572571
    on Apr 27, 2026
    More actions

    Actually, as long as you use the OMO plugin's Plan Builder with the DeepSeek V4 model to start planning a feature, when your context usage reaches about 10%, this problem will inevitably be triggered — it feels like something has been cleared.

    Reacted by kenlive
  16. 3 remaining items

  17. rekram1-node commented on Apr 27, 2026

    @rekram1-node
    rekram1-node
    on Apr 27, 2026
    Member
    More actions

    For anyone using custom providers do this:

    "provider": {
        "custom-deepseek": {
          "models": {
            "deepseek-v4-pro": {
              "interleaved": {
                "field": "reasoning_content",
              },
            },
          },
        },
      },
    

    I'll configure stuff to default it to set this for deepseek models but for now you need to follow this as mentioned in many issues and many prs (@yujf @Meepoljdx)

    Reacted by d770, Kay, yujf and EwardWang
    Reacted by Kay
  18. yujf commented on Apr 28, 2026

    @yujf
    yujf
    on Apr 28, 2026
    More actions

    Thank you, it works fine after adding interleaved. @rekram1-node

  19. hearkenmx commented on Apr 28, 2026

    @hearkenmx
    hearkenmx
    on Apr 28, 2026
    More actions

    Same issue here. Environment details:

    • opencode v1.14.28
    • Provider: @ai-sdk/openai-compatible with custom endpoint (myeth)
    • Model: deepseek-v4-pro
    • Error: AI_APICallError: The reasoning_content in the thinking mode must be passed back to the API.

    Occurs consistently on the 2nd+ turn. Workaround: setting "reasoning": false in opencode.json model config.

  20. matteo-pacini
    added a commit that references this issue on Apr 28, 2026

    feat(opencode): research-backed agent tuning (#225)

    fa42662
  21. rekram1-node commented on Apr 28, 2026

    @rekram1-node
    rekram1-node
    on Apr 28, 2026
    Member
    More actions

    @hearkenmx refer to what I said above, or provide your config

    Reacted by Max
  22. jukefr commented on Apr 28, 2026

    @jukefr
    jukefr
    on Apr 28, 2026
    More actions

    still having issues with this even after doing what you suggested with interleaved....

    {
      "$schema": "https://opencode.ai/config.json",
      "permission": {
        "*": "allow",
        "doom_loop": "ask",
        "external_directory": "ask",
        "read": {
          "*": "allow",
          "*.env": "deny",
          "*.env.*": "deny",
          "*.env.example": "allow"
        },
        "bash": {
          "*": "allow",
          "rm -rf *": "ask",
          "git push --force*": "deny",
          "git push -f *": "deny",
          "DROP TABLE*": "deny",
          "DROP DATABASE*": "deny"
        }
      },
      "mcp": {
        "context7": {
          "type": "remote",
          "url": "https://mcp.context7.com/mcp",
          "enabled": true
        },
        "engram": {
          "type": "local",
          "command": [
            "engram",
            "mcp",
            "--tools=agent"
          ]
        }
      },
      "snapshot": false,
      "autoupdate": "notify",
      "share": "manual",
      "provider": {
        "openrouter": {
          "models": {
            "deepseek/deepseek-v4-flash": {
              "interleaved": {
                "field": "reasoning_content"
              }
            }
          }
        }
      }
    }
    

    the first like 5 requests seem to go fine but then the

    [DeepSeek] The `reasoning_content` in the thinking mode must be passed back to the API.
    

    appears out of nowhere

    it happened right after a todowrite tool call if that helps ?

    and also the session appear to be unrecoverable from this point onwards no matter what prompt you pass to deepseek

    and im running latest release also 1.14.28

  23. i-blis commented on Apr 28, 2026

    @i-blis
    i-blis
    on Apr 28, 2026
    More actions

    Issue persists even with

    "provider": {
        "openrouter": {
          "models": {
            "deepseek-v4-flash": {
              "interleaved": {
                "field": "reasoning_content",
              },
            },
          },
        },
      },
    

    Running 1.14.28, session posted above.

  24. rekram1-node commented on Apr 28, 2026

    @rekram1-node
    rekram1-node
    on Apr 28, 2026
    Member
    More actions

    Yeah it's a bug in openrouter sdk ill get to it

  25. DiegoMagdaleno commented on Apr 28, 2026

    @DiegoMagdaleno
    DiegoMagdaleno
    on Apr 28, 2026
    More actions

    Having the same issue with OpenCode Go, I reproduced it on a random task.

    session.json

  26. rekram1-node commented on Apr 28, 2026

    @rekram1-node
    rekram1-node
    on Apr 28, 2026
    Member
    More actions

    @DiegoMagdaleno that's because you are on an older version, please upgrade

  27. rekram1-node commented on Apr 28, 2026

    @rekram1-node
    rekram1-node
    on Apr 28, 2026
    Member
    More actions

    Okay OpenRouter said they are merging a fix on their end

    Note to those in this thread this is an issue about OPENROUTER so if you are having issues with a specific provider check:

    • are you on latest
    • are you using openrouter? If not open a new issue or comment on separate one
    • are you using custom provider? If so be sure to set the interleaved reasoning fields
    Reacted by XaPoHbomj
  28. rekram1-node commented on Apr 28, 2026

    @rekram1-node
    rekram1-node
    on Apr 28, 2026
    Member
    More actions

    Okay their change rolled out to their api, I tested and was unable to reproduce issue after, will close this but continue monitoring

    Reacted by Kay
  29. rekram1-node
    closed this as completedon Apr 28, 2026
  30. hearkenmx commented on Apr 29, 2026

    @hearkenmx
    hearkenmx
    on Apr 29, 2026
    More actions

    new-api based router has the same issue, in case anyone use that infra, I think they already aware of it.
    QuantumNous/new-api#4408

    Reacted by dream zhao
  31. 0x7CFE commented on May 27, 2026

    @0x7CFE
    0x7CFE
    on May 27, 2026
    More actions

    Experienced the same issue today on OpenRouter. Everything just broke. OTOH, free tier model from Zen worked flawlessly.

    Tried switching/banning specific providers using OpenRouter guardrails, got this or just 400.

    Image

    P.S.: Also usage price just exploded. Don't sure if it's related. Looked almost like queries weren't cached at all.

    Reacted by Peter Mills, Mikhail, Nifury and Quentin Gillet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @rekram1-node
    rekram1-node

Labels

bugSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.