Skip to content

deepseek-v4-pro model ID is not recognized as a thinking model, causing reasoning_content errors even with interleaved configured #24097

@ruichenrui

Description

@ruichenrui

Description

Config that fails

{
  "provider": {
    "deepseek": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "DeepSeek",
      "options": {
        "baseURL": "https://api.deepseek.com",
        "apiKey": "<key>"
      },
      "models": {
        "deepseek-v4-pro": {
          "name": "DeepSeek-V4-Pro",
          "limit": { "context": 1048576, "output": 262144 },
          "interleaved": { "field": "reasoning_content" },
          "options": {
            "reasoningEffort": "max",
            "thinking": { "type": "enabled" }
          }
        }
      }
    }
  }
}

**Error**

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

**Workaround that works**

Changing the model key from deepseek-v4-pro to deepseek-reasoner (with identical options) resolves the error:
"deepseek-reasoner": {
  "name": "DeepSeek-V4-Pro",
  "interleaved": { "field": "reasoning_content" },
  ...
}

**Expected behavior**

deepseek-v4-pro should be recognized as a thinking/reasoning model and handle reasoning_content correctly when interleaved is configured, just like deepseek-reasoner.

**Reference**

DeepSeek API docs list deepseek-v4-pro as the official model identifier for V4 Pro: https://api-docs.deepseek.com/

### Plugins

_No response_

### OpenCode version

1.14.21

### Steps to reproduce

_No response_

### Screenshot and/or share link

_No response_

### Operating System

_No response_

### Terminal

_No response_

Metadata

Metadata

Assignees

Labels

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

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions