can not use deepseek-api in opencode #7701

Closed
opened 2026-02-16 18:07:58 -05:00 by yindo · 3 comments
Owner

Originally created by @9p15p on GitHub (Jan 27, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

I want to use DeepSeek's official API in my opencode project, but it seems to be giving an error.

Missing reasoning_content field in the assistant message at message index 8. For more information, please refer to https://api-docs.deepseek.com/guides/thinking_mode#tool-calls

It seems this bug was fixed before, but the patch was later removed.
https://github.com/anomalyco/opencode/issues/4947

Plugins

ohmyopencode

OpenCode version

1.1.36

Steps to reproduce

  1. use deepseek-api(deepseek-reasoner)

Screenshot and/or share link

No response

Operating System

ubuntu22.04

Terminal

zsh

Originally created by @9p15p on GitHub (Jan 27, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description I want to use DeepSeek's official API in my opencode project, but it seems to be giving an error. Missing `reasoning_content` field in the assistant message at message index 8. For more information, please refer to https://api-docs.deepseek.com/guides/thinking_mode#tool-calls It seems this bug was fixed before, but the patch was later removed. https://github.com/anomalyco/opencode/issues/4947 ### Plugins ohmyopencode ### OpenCode version 1.1.36 ### Steps to reproduce 1. use deepseek-api(deepseek-reasoner) ### Screenshot and/or share link _No response_ ### Operating System ubuntu22.04 ### Terminal zsh
yindo added the bug label 2026-02-16 18:07:58 -05:00
yindo closed this issue 2026-02-16 18:07:58 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 27, 2026):

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

  • #4947: DeepSeek 3.2: Missing reasoning_content - The original issue with the same error message
  • #5027: Deepseek missing "reasoning_content" field ; deepseek_reasoner model erroring out - Another instance of the same error
  • #5332: DeepSeek API requires reasoning_content but opencode does not preserve or forward it - Related reasoning_content handling issue
  • #6040: reasoning_content not sent when using @ai-sdk/openai-compatible with deepseek-reasoner - Related reasoning_content not being sent in subsequent requests
  • #9397: Deepseek-chat:options:thinking:type:enabled thinking tools bug - Related thinking mode error

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 27, 2026): This issue might be a duplicate of existing issues. Please check: - #4947: DeepSeek 3.2: Missing `reasoning_content` - The original issue with the same error message - #5027: Deepseek missing "reasoning_content" field ; deepseek_reasoner model erroring out - Another instance of the same error - #5332: DeepSeek API requires reasoning_content but opencode does not preserve or forward it - Related reasoning_content handling issue - #6040: reasoning_content not sent when using @ai-sdk/openai-compatible with deepseek-reasoner - Related reasoning_content not being sent in subsequent requests - #9397: Deepseek-chat:options:thinking:type:enabled thinking tools bug - Related thinking mode error Feel free to ignore if none of these address your specific case.
Author
Owner

@9p15p commented on GitHub (Jan 27, 2026):

this is my opencode.json

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": [
    "oh-my-opencode@latest",
    "opencode-antigravity-auth@1.3.1"
  ],
  "provider": {
    "deepseek": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "DeepSeek",
      "options": {
        "baseURL": "https://api.deepseek.com/v1",
        "apiKey": "{env:DEEPSEEK_API_KEY}"
      },
      "models": {
        "deepseek-chat": {
          "name": "DeepSeek V3",
          "limit": {
            "context": 128000,
            "output": 8192
          }
        },
        "deepseek-reasoner": {
          "name": "DeepSeek R1",
          "limit": {
            "context": 128000,
            "output": 65536
          }
        }
      }
    },
}

this is my oh-my-opencode.json

{
  "$schema": "https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/master/assets/oh-my-opencode.schema.json",
  "agents": {
    "sisyphus": {
      "model": "deepseek/deepseek-chat",
      "variant": "high"
    },
    "oracle": {
      "model": "deepseek/deepseek-reasoner",
      "variant": "high"
    },
    "librarian": {
      "model": "deepseek/deepseek-chat"
    },
    "explore": {
      "model": "deepseek/deepseek-chat"
    },
    "multimodal-looker": {
      "model": "opencode/gemini-3-flash"
    },
    "prometheus": {
      "model": "deepseek/deepseek-reasoner",
      "variant": "max"
    },
    "metis": {
      "model": "deepseek/deepseek-reasoner",
      "variant": "max"
    },
    "momus": {
      "model": "deepseek/deepseek-reasoner",
      "variant": "medium"
    },
    "atlas": {
      "model": "deepseek/deepseek-chat"
    }
  },
  "categories": {
    "visual-engineering": {
      "model": "deepseek/deepseek-chat"
    },
    "ultrabrain": {
      "model": "deepseek/deepseek-reasoner",
      "variant": "xhigh"
    },
    "artistry": {
      "model": "deepseek/deepseek-chat",
      "variant": "max"
    },
    "quick": {
      "model": "deepseek/deepseek-chat"
    },
    "unspecified-low": {
      "model": "deepseek/deepseek-chat",
      "variant": "medium"
    },
    "unspecified-high": {
      "model": "deepseek/deepseek-chat",
      "variant": "medium"
    },
    "writing": {
      "model": "deepseek/deepseek-chat"
    }
  }
}
@9p15p commented on GitHub (Jan 27, 2026): this is my opencode.json ``` { "$schema": "https://opencode.ai/config.json", "plugin": [ "oh-my-opencode@latest", "opencode-antigravity-auth@1.3.1" ], "provider": { "deepseek": { "npm": "@ai-sdk/openai-compatible", "name": "DeepSeek", "options": { "baseURL": "https://api.deepseek.com/v1", "apiKey": "{env:DEEPSEEK_API_KEY}" }, "models": { "deepseek-chat": { "name": "DeepSeek V3", "limit": { "context": 128000, "output": 8192 } }, "deepseek-reasoner": { "name": "DeepSeek R1", "limit": { "context": 128000, "output": 65536 } } } }, } ``` this is my oh-my-opencode.json ``` { "$schema": "https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/master/assets/oh-my-opencode.schema.json", "agents": { "sisyphus": { "model": "deepseek/deepseek-chat", "variant": "high" }, "oracle": { "model": "deepseek/deepseek-reasoner", "variant": "high" }, "librarian": { "model": "deepseek/deepseek-chat" }, "explore": { "model": "deepseek/deepseek-chat" }, "multimodal-looker": { "model": "opencode/gemini-3-flash" }, "prometheus": { "model": "deepseek/deepseek-reasoner", "variant": "max" }, "metis": { "model": "deepseek/deepseek-reasoner", "variant": "max" }, "momus": { "model": "deepseek/deepseek-reasoner", "variant": "medium" }, "atlas": { "model": "deepseek/deepseek-chat" } }, "categories": { "visual-engineering": { "model": "deepseek/deepseek-chat" }, "ultrabrain": { "model": "deepseek/deepseek-reasoner", "variant": "xhigh" }, "artistry": { "model": "deepseek/deepseek-chat", "variant": "max" }, "quick": { "model": "deepseek/deepseek-chat" }, "unspecified-low": { "model": "deepseek/deepseek-chat", "variant": "medium" }, "unspecified-high": { "model": "deepseek/deepseek-chat", "variant": "medium" }, "writing": { "model": "deepseek/deepseek-chat" } } } ```
Author
Owner

@9p15p commented on GitHub (Jan 27, 2026):

It can be solved by https://github.com/anomalyco/opencode/issues/6040

@9p15p commented on GitHub (Jan 27, 2026): It can be solved by https://github.com/anomalyco/opencode/issues/6040
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7701