fix(deepseek): replay reasoning content for tool calls#12360
fix(deepseek): replay reasoning content for tool calls#12360Jerry2003826 wants to merge 1 commit intocontinuedev:mainfrom
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
💡 Codex Reviewcontinue/gui/src/forms/AddModelForm.tsx Lines 75 to 76 in 5950948 The stale-response check in ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
CI note: the checks for the area touched by this PR are green, including This looks unrelated to this PR's
I tried to rerun the failed job, but GitHub requires repository admin rights for that. Could a maintainer rerun |
Fixes #12246
Summary
reasoning_content: ""to DeepSeek assistant messages when replaying chat history through the OpenAI-compatible adapter.reasoning_contentreturned by DeepSeek instead of overwriting it.Root Cause
The CLI path uses
@continuedev/openai-adaptersdirectly. Unlike the core OpenAI converter, the DeepSeek adapter did not addreasoning_contentwhen replaying previous assistant messages. During a tool-call loop, DeepSeek's strict API gateway can reject the follow-up request after a local tool result because the previous assistant tool-call message lacks this field.Validation
npm test -- src/test/main.test.ts -t "DeepSeek"frompackages/openai-adaptersnpm test -- src/test/main.test.tsfrompackages/openai-adaptersnpm testfrompackages/openai-adaptersnpm run buildfrompackages/openai-adaptersnpx prettier --check packages/openai-adapters/src/apis/DeepSeek.ts packages/openai-adapters/src/test/main.test.tsSummary by cubic
Ensure DeepSeek assistant tool-call replays include
reasoning_contentso follow-up requests aren’t rejected during CLI tool-result loops. Fixes #12246.reasoning_content: ""to assistant messages during replay in the OpenAI-compatible adapter.reasoning_contentwhen provided by DeepSeek.Written for commit 5950948. Summary will update on new commits.