Skip to content

DeepSeek V4.1 Flash Responses emits non-roundtrippable reasoning.content:null #949

Description

@ele-yufo

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

  1. 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.
  2. 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].
  3. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions