Repository navigation
Description
Problem
Using DeepSeek thinking models through an OpenAI-compatible Custom Inference endpoint can fail on follow-up requests because reasoning_content is not being round-tripped in conversation history.
Preview-build error observed with the OpenCode endpoint:
Response stream finished unexpectedly with internal error: POST "https://opencode.ai/zen/go/v1/chat/completions": 400 Bad Request {"message":"Error from provider (DeepSeek): The `reasoning_content` in the thinking mode must be passed back to the API.","type":"invalid_request_error","param":null,"code":"invalid_request_error"}
Local endpoint evidence
Tested against https://opencode.ai/zen/go/v1/ without including credentials in logs or this issue.
GET /modelslists DeepSeek thinking-capable models includingdeepseek-v4-proanddeepseek-v4-flash.- Direct
POST /chat/completionsprobes against listed DeepSeek models worked. - DeepSeek responses included
reasoning_contentin assistant messages / stream deltas.
Provider docs
DeepSeek Thinking Mode docs describe that thinking-mode tool-call turns must pass reasoning_content back to the API on the next request:
Likely scope
This looks like provider conversation/history handling in the backend/provider adapter path, not a client model-list or Custom Inference modal contract issue.
The model autofill proposal can import DeepSeek model IDs correctly, but successful multi-turn use of these models likely requires preserving and replaying reasoning_content when constructing follow-up chat-completion requests for DeepSeek-compatible providers.
Acceptance criteria
- DeepSeek thinking-mode responses preserve
reasoning_contentin conversation state when required by the provider. - Follow-up requests for DeepSeek-compatible models include the required
reasoning_contentfields in prior assistant messages. - The fix is scoped so providers that do not support or require
reasoning_contentare unaffected. - Add regression coverage for a multi-turn DeepSeek-compatible response that includes
reasoning_contentfollowed by a request that must replay it.
Related issue
Model autofill for Custom Inference endpoints is tracked separately in #11586.
Activity
warp-for-oss commentedon May 23, 2026
@thesammykins
Here's what I found while triaging this issue:
DeepSeek's docs confirm that thinking-mode tool-call turns must replay
reasoning_contenton later requests. This looks distinct from #11586's model-import work and likely needs provider-history handling rather than Custom Inference UI changes.Maintainer details
I concluded that custom Inference follow-up requests to DeepSeek thinking models appear to fail because provider-specific reasoning_content is not preserved and replayed in chat history..
Triage summary
This appears to be a provider-adapter bug for OpenAI-compatible Custom Inference models that expose DeepSeek thinking-mode responses. The report includes an exact 400 from the OpenCode endpoint showing DeepSeek rejected a follow-up request because
reasoning_contentfrom prior assistant/tool-call history was not replayed.Evidence
reasoning_contentback on subsequent requests.custom_model_providersand has generic reasoning display support, but this checkout has noreasoning_contentfield or DeepSeek-specific round-trip handling.Reproducibility
Medium. The report has a concrete endpoint, model family, provider error, and documentation backing; it still depends on a configured Custom Inference endpoint and a follow-up conversation shape that triggers DeepSeek thinking-mode tool-call history.
Duplicate check
I searched all open issues and recently closed issues. #11586 and #11514 are related to model discovery/import for Custom Inference endpoints, but they do not cover the
reasoning_contentround-trip failure, and fewer than two likely duplicates were found.This is my automated analysis and may be incorrect. A maintainer will verify the details.
Powered by Oz
RajeevRKC commentedon May 24, 2026
Confirming this is blocking multi-turn DeepSeek conversations with Thinking Mode. The
easoning_content field must be preserved in conversation history for subsequent API requests to work. This is a documented requirement in the DeepSeek Thinking Mode API docs.
DennisZhangOiler commentedon May 25, 2026
I met same issue and I wanna fix it, but I am not familiar with the repo, can anyone guide me to the place where I should begin?
Aleda commentedon May 29, 2026
This might be an issue with the warp backend that can only be fixed by the warp's developers?
spec(GH11963): custom-endpoint model config & capability parity
danielpeng2 commentedon Jul 30, 2026
Sorry for the delayed response. This was a server-side issue that we've fixed on our end. I'm going to close out this issue, but feel free to reopen if it starts again.