Skip to content

bug: deepseek-reasoner v3.2 compatibility issue #1315

@chenyh1990

Description

@chenyh1990
  • I have looked for existing issues (including closed) about this

Bug Report

When using deepseek-reasoner to creata an agent, "Missing reasoning_content field" error occurs.

Reproduction

        let client = deepseek::Client::from_env();
        let fin_agent = client
            .agent(deepseek::DEEPSEEK_REASONER)
            .preamble(PREAMPLE)
            .max_tokens(4 * 1024)
            .tools(tools)
            .build();

        let resp = fin_agent
            .prompt("Stock symbol of XXX in Hong Kong Stock Exchange")
            .await
            .unwrap();
        println!("Response: {}", resp);

Got this error:

called `Result::unwrap()` on an `Err` value: CompletionError(HttpError(InvalidStatusCodeWithMessage(400, "{\"error\":{\"message\":\"Missing `reasoning_content` field in the assistant message at message index 2. For more information, please refer to https://api-docs.deepseek.com/guides/thinking_mode#tool-calls\",\"type\":\"invalid_request_error\",\"param\":null,\"code\":\"invalid_request_error\"}}")))

Expected behavior

Should work as deepseek-chat model.

Screenshots

Additional context

Seems related to a server-side update in v3.2: langgenius/dify#28988

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions