With deepseek/deepseek-v4.1-flash on /provider/v1/responses, a tool-call response contains a reasoning item with content: null. Replaying that item (as Responses clients such as Codex CLI do) alongside its function_call and a string function_call_output returns HTTP 400 Invalid input (param: input).
Minimal reproduction
- Send a
/provider/v1/responses request to deepseek/deepseek-v4.1-flash with one function tool; the model returns a reasoning item whose content is null, followed by a function_call.
- Send the next turn with
input = [previous user message, the returned reasoning item unchanged, the function_call, a function_call_output with a string output].
- Result: HTTP 400
Invalid input, param: input.
Controls
- Identical request with only
reasoning.content changed from null to [] → HTTP 200.
- Identical request with the reasoning item removed → HTTP 200.
- Changing
store, parallel_tool_calls, or call IDs does not affect the result.
- The same flow works with
mimo-v2.6-flash, mimo-v2.6-pro and step-5-preview on the same endpoint.
Impact
Codex CLI (and other Responses clients that replay reasoning items) cannot complete any tool-using turn with DeepSeek V4.1 Flash on the GOAT plan.
Request
Please either emit a round-trippable reasoning item (e.g. content: []) or accept content: null on input, and ideally identify the offending field in the Invalid input error.
With
deepseek/deepseek-v4.1-flashon/provider/v1/responses, a tool-call response contains areasoningitem withcontent: null. Replaying that item (as Responses clients such as Codex CLI do) alongside itsfunction_calland a stringfunction_call_outputreturns HTTP 400Invalid input(param: input).Minimal reproduction
/provider/v1/responsesrequest todeepseek/deepseek-v4.1-flashwith one function tool; the model returns areasoningitem whosecontentisnull, followed by afunction_call.input= [previous user message, the returnedreasoningitem unchanged, thefunction_call, afunction_call_outputwith a string output].Invalid input,param: input.Controls
reasoning.contentchanged fromnullto[]→ HTTP 200.store,parallel_tool_calls, or call IDs does not affect the result.mimo-v2.6-flash,mimo-v2.6-proandstep-5-previewon the same endpoint.Impact
Codex CLI (and other Responses clients that replay reasoning items) cannot complete any tool-using turn with DeepSeek V4.1 Flash on the GOAT plan.
Request
Please either emit a round-trippable reasoning item (e.g.
content: []) or acceptcontent: nullon input, and ideally identify the offending field in theInvalid inputerror.