Skip to content

deepseekv4 content[].thinking error #24870

Closed as not planned
Closed as not planned

Description

@mq00fc

Description

Bad Request: {"error":{"message":"The content[].thinking in the thinking mode must be passed back to the API.","type":"invalid_request_error","param":null,"code":"invalid_request_error"}}

Plugins

oh-my-openagent,opencode-md-table-formatter

OpenCode version

1.14.29

Steps to reproduce

The above error occurs when using the DeepSeek model to ask questions

Screenshot and/or share link

No response

Operating System

windows11

Terminal

pwsh

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Apr 29, 2026
  2. github-actions commented on Apr 29, 2026

    @github-actions
    Contributor

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

    Please review those issues to see if they address your problem. If the fix from a closed issue didn't resolve it for you, please add a comment there or provide more details about what's different in your case.

  3. mq00fc commented on Apr 29, 2026

    @mq00fc
    Author
    "provider": {
        "deepseek": {
          "npm": "@ai-sdk/anthropic",
          "name": "DeepSeek",
          "options": {
            "baseURL": "https://api.deepseek.com/anthropic",
            "apiKey": ""
          },
          "models": {
            "deepseek-v4-pro": {
              "name": "DeepSeek-V4-Pro",
    		  "interleaved": {
                "field": "reasoning_content",
              },
              "limit": {
                "context": 1048576,
                "output": 262144
              },
              "options": {
                "thinking": {
                  "type": "enabled",
                  "budgetTokens": 8192
                }
              }
            },
            "deepseek-v4-flash": {
              "name": "DeepSeek-V4-Flash",
    		  "interleaved": {
                "field": "reasoning_content",
              },
              "limit": {
                "context": 1048576,
                "output": 262144
              },
              "options": {
                "thinking": {
                  "type": "enabled",
                  "budgetTokens": 8192
                }
              }
            }
          }
        }
      }

    The above configuration causes problems if I use the default deepseek as the provider, but it works fine if I change the name to custom-deepseek

    Image
  4. removed
    bugSomething isn't working
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  5. DXXS commented on May 15, 2026

    @DXXS

    These 'content[].thinking error's are still persisting in version 1.14.50 for me (despite having reported it in #24261, which bots apparently decided has somehow already qualified as 'closed'!?).

    I also tried the renamed 'custom-deepseek' approach recommended by @mq00fc, but it still didn't stop the errors for me...

  6. mq00fc commented on May 15, 2026

    @mq00fc
    Author

    These 'content[].thinking error's are still persisting in version 1.14.50 for me (despite having reported it in #24261, which bots apparently decided has somehow already qualified as 'closed'!?).

    I also tried the renamed 'custom-deepseek' approach recommended by @mq00fc, but it still didn't stop the errors for me...

    It seems this issue really has been fixed; when I stopped using a custom name and switched back to the default "deepseek," the problem no longer occurred

  7. DXXS commented on May 15, 2026

    @DXXS

    Not for me yet! i've tried it multiple ways, and even tried updating my '.config/opencode/opencode.json' variation to include the 'interleaved' field you mention above (which mine did not have yet, though I had copied it from deepseek's own example at the time). I have found that when the error comes up, I can just tell the AI that I am replying with '?' because opencode is erroring, and it manages to proceed with multiple stops along the way...

  8. rekram1-node commented on May 15, 2026

    @rekram1-node
    Collaborator

    Can I have more info about the setups people are using? @DXXS are u using anthropic api? Can u use the completions api?

    Deepseek isnt compliant w/ the anthropic sdk we use, I can apply patches to the sdk as a workaround

  9. DXXS commented on May 15, 2026

    @DXXS

    My setup was already otherwise listed in the linked report man.

  10. github-actions commented on Jul 15, 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