Skip to content

reasoning_content is missing when using DeepSeek V4 Flash in thinking #29618

@beeckrumi0000

Description

@beeckrumi0000

Description

Summary

When using OpenCode with OpenRouter and DeepSeek V4 Flash/Pro, the agent fails with:
[DeepSeek] The 'reasoning_content' in the thinking mode must be passed back to the API.

Environment

  • OpenCode: latest
  • OpenRouter: latest
  • Model: DeepSeek V4 Flash / DeepSeek V4 Pro
  • reasoningEffort: xhigh
  • Thinking mode: enabled

Expected behavior

OpenCode should preserve and pass reasoning_content back to the API when the model requires it.

Actual behavior

The request fails because reasoning_content is missing from the payload.

Notes

This also happens with DeepSeek V4 Pro on OpenRouter, not only Flash.
I confirmed this happens with OpenCode + OpenRouter + DeepSeek V4 Flash/Pro even after updating to the latest version.

Reference

The issue seems related to reasoning field propagation in OpenCode/OpenRouter integrations.

Plugins

warp

OpenCode version

1.15.11

Steps to reproduce

No response

Screenshot and/or share link

Image

Operating System

Ubuntu 22.04

Terminal

Warp

Metadata

Metadata

Assignees

Labels

No labels
No labels

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