You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
An error occurred when using the deepseek-v4-pro model #24111
Under the Windows system, OpenCode uses the DeepSeek-v4-Pro model, but encounters errors during the conversation process. The thinking mode of DeepSeek V4 requires that the reasoning_content returned by the previous round of the model must be passed back unchanged during multiple rounds of conversation. However, OpenCode may not currently handle this field correctly, resulting in API errors
Plugins
no
OpenCode version
v1.14.22
Steps to reproduce
Add the deepseek-v4-pro model to the local opencode.json, set it as the default model, and then initiate a complex encoding task
Same issue here with deepseek-v4-flash + thinking mode. The error is identical —
easoning_content not being passed back on conversation continuation.
There's already a working fix from the author of #24104. See fkyah3's comment at #24104 (comment) — they have a commit on their fork (kyah3/opencode-fkyah3, branch ix/permission-reasoning-truncation, commit 5b6ad05d) that:
Broadens the reasoning content check to fire for any model with capabilities.reasoning
Unconditionally injects
easoning_content (empty string if no reasoning text) into ALL assistant messages
Works stably across long conversations with heavy tool use
In the meantime, a quick workaround is to remove hinking: { type: "enabled" } from your model config — the error goes away but you lose thinking mode.
Same issue here with deepseek-v4-flash + thinking mode. The error is identical — easoning_content not being passed back on conversation continuation.
There's already a working fix from the author of #24104. See fkyah3's comment at #24104 (comment) — they have a commit on their fork (kyah3/opencode-fkyah3, branch ix/permission-reasoning-truncation, commit 5b6ad05d) that:
Broadens the reasoning content check to fire for any model with capabilities.reasoning
Unconditionally injects
easoning_content (empty string if no reasoning text) into ALL assistant messages
Works stably across long conversations with heavy tool use
In the meantime, a quick workaround is to remove hinking: { type: "enabled" } from your model config — the error goes away but you lose thinking mode.
I've checked, and it seems like fkyah3 has already fixed this issue in his forked branch. When will the current project be fixed? I don't really want to download fkyah3's code and package it locally
Activity
github-actions commentedon Apr 24, 2026
This issue might be a duplicate of existing issues. Please check:
deepseek-v4-promodel ID is not recognized as a thinking model, causingreasoning_contenterrors even withinterleavedconfigured #24097:deepseek-v4-promodel ID not recognized as a thinking model, causing the samereasoning_contenterrorreasoning_contentmust be passed back to API on conversation continuation (same root cause and error message)reasoning_contentfield in assistant message for DeepSeek API implementationThese issues describe the same underlying problem you're encountering. Please check if one of them covers your case before continuing here.
zghbyslzf commentedon Apr 24, 2026
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"deepseek": {
"npm": "@ai-sdk/openai-compatible",
"name": "DeepSeek",
"options": {
"baseURL": "https://api.deepseek.com",
"apiKey": ""
},
"models": {
"deepseek-v4-pro": {
"name": "DeepSeek-V4-Pro",
"limit": {
"context": 1048576,
"output": 262144
},
"options": {
"reasoningEffort": "max",
"thinking": {
"type": "enabled"
}
}
},
// 可选Flash版本
"deepseek-v4-flash": {
"name": "DeepSeek-V4-Flash",
"limit": {
"context": 1048576,
"output": 262144
}
}
}
}
},
"model": "deepseek/deepseek-v4-pro"
}
My local settings are as follows, and I have also looked into other related issues, but it seems that they have not resolved the problem
bilbillm commentedon Apr 24, 2026
Same issue here with deepseek-v4-flash + thinking mode. The error is identical —
easoning_content not being passed back on conversation continuation.
There's already a working fix from the author of #24104. See fkyah3's comment at #24104 (comment) — they have a commit on their fork (kyah3/opencode-fkyah3, branch ix/permission-reasoning-truncation, commit 5b6ad05d) that:
easoning_content (empty string if no reasoning text) into ALL assistant messages
In the meantime, a quick workaround is to remove hinking: { type: "enabled" } from your model config — the error goes away but you lose thinking mode.
zghbyslzf commentedon Apr 24, 2026
I've checked, and it seems like fkyah3 has already fixed this issue in his forked branch. When will the current project be fixed? I don't really want to download fkyah3's code and package it locally