reasoning_content not sent when using @ai-sdk/openai-compatible with deepseek-reasoner #3792

Closed
opened 2026-02-16 17:41:28 -05:00 by yindo · 4 comments
Owner

Originally created by @aaudin90 on GitHub (Dec 23, 2025).

Originally assigned to: @rekram1-node on GitHub.

Description

The reasoning_content is displayed in UI (received correctly), but not sent back to API in subsequent requests.

Config

{
  "provider": {
    "my-proxy": {
      "npm": "@ai-sdk/openai-compatible",
      "options": {
        "baseURL": "http://localhost:8001/v1"
      },
      "models": {
        "deepseek-reasoner": {
          "id": "deepseek-reasoner",
          "name": "DeepSeek Reasoner"
        }
      }
    }
  }
}

Related

OpenCode version

1.0.191

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Originally created by @aaudin90 on GitHub (Dec 23, 2025). Originally assigned to: @rekram1-node on GitHub. ### Description The `reasoning_content` is displayed in UI (received correctly), but not sent back to API in subsequent requests. ## Config ```json { "provider": { "my-proxy": { "npm": "@ai-sdk/openai-compatible", "options": { "baseURL": "http://localhost:8001/v1" }, "models": { "deepseek-reasoner": { "id": "deepseek-reasoner", "name": "DeepSeek Reasoner" } } } } } ``` ## Related - PR #4975 - Issue #4947 ### OpenCode version 1.0.191 ### Steps to reproduce _No response_ ### Screenshot and/or share link _No response_ ### Operating System _No response_ ### Terminal _No response_
yindo closed this issue 2026-02-16 17:41:28 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Dec 23, 2025):

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

  • #4947: DeepSeek 3.2: Missing reasoning_content - Similar issue with missing reasoning_content field
  • #5027: Deepseek missing "reasoning_content" field; deepseek_reasoner model erroring out - Same error with deepseek_reasoner model
  • #5332: DeepSeek API requires reasoning_content but opencode does not preserve or forward it - Issue about not forwarding reasoning_content
  • #5577: DeepSeek V3.2: reasoning_content not cleared from message history on new turns - Related issue about reasoning_content handling

Feel free to ignore if this addresses a specific case with @ai-sdk/openai-compatible that differs from these issues.

@github-actions[bot] commented on GitHub (Dec 23, 2025): This issue might be a duplicate of existing issues. Please check: - #4947: DeepSeek 3.2: Missing `reasoning_content` - Similar issue with missing reasoning_content field - #5027: Deepseek missing "reasoning_content" field; deepseek_reasoner model erroring out - Same error with deepseek_reasoner model - #5332: DeepSeek API requires reasoning_content but opencode does not preserve or forward it - Issue about not forwarding reasoning_content - #5577: DeepSeek V3.2: reasoning_content not cleared from message history on new turns - Related issue about reasoning_content handling Feel free to ignore if this addresses a specific case with @ai-sdk/openai-compatible that differs from these issues.
Author
Owner

@rekram1-node commented on GitHub (Dec 23, 2025):

If you are making a custom model that needs reasoning content you need to tell us this in your config so just add:

“interleaved”: {
“field”: “reasoning_content”
}

to your model options and it should work

@rekram1-node commented on GitHub (Dec 23, 2025): If you are making a custom model that needs reasoning content you need to tell us this in your config so just add: “interleaved”: { “field”: “reasoning_content” } to your model options and it should work
Author
Owner

@rekram1-node commented on GitHub (Dec 23, 2025):

Here is what you need to set:

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "my-proxy": {
      "npm": "@ai-sdk/openai-compatible",
      "options": {
        "baseURL": "http://localhost:8001/v1",
      },
      "models": {
        "deepseek-reasoner": {
          "id": "deepseek-reasoner",
          "name": "DeepSeek Reasoner",
          "interleaved": {
            "field": "reasoning_content",
          },
        },
      },
    },
  },
}
@rekram1-node commented on GitHub (Dec 23, 2025): Here is what you need to set: ``` { "$schema": "https://opencode.ai/config.json", "provider": { "my-proxy": { "npm": "@ai-sdk/openai-compatible", "options": { "baseURL": "http://localhost:8001/v1", }, "models": { "deepseek-reasoner": { "id": "deepseek-reasoner", "name": "DeepSeek Reasoner", "interleaved": { "field": "reasoning_content", }, }, }, }, }, } ```
Author
Owner

@aaudin90 commented on GitHub (Dec 24, 2025):

It works, thx

@aaudin90 commented on GitHub (Dec 24, 2025): It works, thx
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3792