Skip to content

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

Closed

Description

@aaudin90

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

Activity

  1. github-actions commented on Dec 23, 2025

    @github-actions
    Contributor

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

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

  2. rekram1-node commented on Dec 23, 2025

    @rekram1-node
    Contributor

    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

  3. rekram1-node commented on Dec 23, 2025

    @rekram1-node
    Contributor

    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",
              },
            },
          },
        },
      },
    }
    
  4. aaudin90 commented on Dec 24, 2025

    @aaudin90
    Author

    It works, thx

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