Skip to content

bug: deepseek fail with Missing reasoning_content #2851

@jensenojs

Description

@jensenojs

Describe the bug

- Datetime: 2025-12-03 19:12:08
- Model:    deepseek/deepseek-reasoner
- Selected files:
  - /Users/oujinsai/.config/nvim/lua/plugins/ai/avante.lua

> 你现在能联网么? 能访问到 avant 的配置么, 现在这个插件这里的背景不是透明的
> 


🤔 Thought content:

> 用户问了两个问题:
> 1. "你现在能联网么?" - 询问我是否能够联网。
> 2. "能访问到 avant 的配置么, 现在这个插件这里的背景不是透明的" - 询问我能否访问到avant插件的配置,说插件背景不是透明的。
> 
> 我需要先检查一下我有哪些工具可用。查看工具列表,有`web_search`和`fetch`,这说明我可以联网。另外,我需要查看avante插件的配置,因为用户说背景不是透明的。用户已经提供了avante.lua文件,我需要分析这个配置。
> 
> 首先,我需要查看当前的avante.lua配置,了解它的设置。然后检查是否有关于背景透明度的相关配置。可能需要搜索avante.nvim的文档或GitHub仓库来了解如何设置背景透明。
> 
> 让我先使用`read_todos`工具来管理任务。然后查看avante.lua文件。用户已经提供了这个文件,但为了确保我理解完整的内容,我应该再查看一下文件内容。不过文件已经在上下文里了。我可以直接分析这个文件。
> 
> 先思考一下:avante.nvim是一个AI助手插件,类似于聊天界面。背景不透明可能是UI主题或窗口设置的问题。我需要查看avante的配置选项,看看是否有关于窗口样式、背景透明度的设置。
> 
> 让我先制定计划,使用`write_todos`工具。然后搜索avante.nvim的文档。使用`web_search`搜索"avante.nvim background transparent"或"avante.nvim window transparency"。同时检查当前的avante配置,看看是否有相关的设置选项。
> 
> 开始执行。



Error: {
  code = "invalid_request_error",
  message = "Missing `reasoning_content` field in the assistant message at message index 7. For more information, please refer to https://api-docs.deepseek.com/guides/thinking_mode#tool-calls",
  param = vim.NIL,
  type = "invalid_request_error"
}

To reproduce

    opts = {
        -- 例如
        provider = "deepseek",
        providers = {
            deepseek = {
                __inherited_from = "openai",
                api_key_name = "DEEPSEEK_API_KEY",
                endpoint = "https://api.deepseek.com",
                model = "deepseek-reasoner",
            },
        },
    },

Expected behavior

no error

Installation method

Use lazy.nvim:

{
  "yetone/avante.nvim",
  event = "VeryLazy",
  lazy = false,
  version = false, -- set this if you want to always pull the latest change
  opts = {
    -- add any opts here
  },
  -- if you want to build from source then do `make BUILD_FROM_SOURCE=true`
  build = "make",
  -- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- for windows
  dependencies = {
    "nvim-lua/plenary.nvim",
    "MunifTanjim/nui.nvim",
  },
}

Environment

v0.11.5

Repro

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

require("lazy.minit").repro({
  spec = {
    -- add any other plugins here
  },
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions