#32992 [Bug]: Routing deepseek-v4-pro through LiteLLM through Codex gives "An assistant message with 'tool_calls' must be followed by tool messages responding to each 'tool_call_id'" 400 error.
### Check for existing issues
- [x] I have searched the existing issues and checked that my issue is not a duplicate.
### What happened?
I am attempting to configure Codex to use LiteLLM as a proxy to DeepSeek due to Codex no longer supporting the chat/completions API. However, when running LiteLLM as a proxy, I obtain the following error:
### Steps to Reproduce
1. Export DeepSeek API key 2. Run LiteLLM: ```litellm --model deepseek/deepseek-v4-pro``` 3. Run Codex and input a command
### Relevant log output
``` {"error":{"message":"litellm.BadRequestError: DeepseekException - {\"error\":{\"message\":\"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)\",\"type\": \"invalid_request_error\",\"param\":null,\"code\":\"invalid_request_error\"}}","type":null,"param":null,"code":"400"}} ```
### What part of LiteLLM is this about?
_No response_
### What LiteLLM version are you on ?
1.92.0
### Twitter / LinkedIn details
_No response_