When using deepseek-reasoner, we often encounter this problem:
| |
Update
Both issues have now been officially resolved by opencode. Users only need to install the latest version of opencode and use it through the deepseek provider, without additional configuration.
| |
Both issues have been officially resolved. Install version 1.14.29 or above.
The old solution follows:
How to solve it? It’s straightforward.
How to Configure
Add provider information to your configuration:
.config/opencode/opencode.json or .config/opencode/opencode.jsonc
Modify the provider section to:
| |
How to Use
Select the deepseek model.

The result.

Supplement
This method cannot solve this problem
Bad Request: {"error":{"message":"The content[].thinking in the thinking mode must be passed back to the API.","type":"invalid_request_error","param":null,"code":"invalid_request_error"}}
If you encounter this problem, you need to wait for opencode to fix it.
Related article: DeepSeek + Claude Code: Thinking Block Compatibility Issue Analysis — Analyzes the root cause of 400 errors triggered by multi-turn conversations in extended thinking mode when using DeepSeek with Claude Code, along with community solutions.
