DeepSeek Chat Completions profile fails after Allow Always/tool approval
What Open Interpreter integration are you using, and what version?
Open Interpreter desktop app 0.2.183 (Rust Open Interpreter built on Codex)
What subscription or API-key provider are you using?
DeepSeek API key provider (api.deepseek.com)
Which provider ID are you using?
deepseek
Which model ID are you using?
deepseek-v4-flash; also observed with deepseek-v4-pro
Which wire API is configured?
Chat Completions
Which harness is selected?
codex
Which host application are you using?
Interpreter desktop app
What platform is your computer?
Darwin 25.5.0 arm64 arm
What issue are you seeing?
With a DeepSeek API profile using Chat Completions, a normal tool approval flow can break the conversation after choosing Allow Always. The same workflow works with a GPT/OpenAI Responses profile.
Sanitized error shown in the app/logs:
An assistant message with 'tool_calls' must be followed by tool messages responding to each 'tool_call_id'. (insufficient tool messages following tool_calls message)Observed behavior: after a command/tool call requests approval, choosing Allow Always saves the approval rule but the next provider request sent to DeepSeek appears to contain an assistant message with tool_calls without the matching tool response. DeepSeek rejects the request, the turn fails, and the chat usually has to be continued in a new chat with history. Choosing Allow Once is less likely to break the thread. GPT/OpenAI Responses handles the same Allow Always path successfully.
What steps can reproduce the bug?
- Configure a DeepSeek API profile in Open Interpreter with provider id
deepseek, wire APIchat/ Chat Completions, and modeldeepseek-v4-flash. - Start a new chat in the Interpreter desktop app.
- Ask for any task that requires a tool/terminal command, for example a harmless local command such as checking the current directory.
- When the approval dialog appears, choose
Allow alwaysinstead ofAllow once. - Continue the conversation or let the turn proceed.
Actual result: the DeepSeek request fails with the tool_calls must be followed by tool messages error above.
Control case: switch the same workflow to GPT/OpenAI Responses and Allow always works.
What is the expected behavior?
Allow always should not leave Chat Completions providers with an invalid message history. Either the tool call should be completed with the matching tool response before the next provider request, or the adapter should repair/filter the history so DeepSeek does not receive an assistant tool_calls message without corresponding tool messages.
The DeepSeek chat should continue the same way it does with GPT/OpenAI Responses.
Additional information
The relevant sanitized configuration shape is:
provider=api
provider id=deepseek
wire API=chat / Chat Completions
useResponsesApi=false
models=deepseek-v4-flash, deepseek-v4-proWorkaround: use GPT/OpenAI Responses for workflows involving tools/approvals, or avoid Allow always with DeepSeek Chat Completions.
Possibly related protocol-level issue: https://github.com/BerriAI/litellm/issues/32992
Source: openinterpreter/openinterpreter