avante.nvim icon indicating copy to clipboard operation
avante.nvim copied to clipboard

bug: API request failed with status 400

Open menash134 opened this issue 10 months ago • 6 comments

Describe the bug

Image

This happened with my below config. I use copilot enterprise and I dont have any limit as such. I dont know what should i do to remove this error please help me

Image

To reproduce

use nvim 0.10.3 ubuntu 22.04I

Expected behavior

No response

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-treesitter/nvim-treesitter",
    "stevearc/dressing.nvim",
    "nvim-lua/plenary.nvim",
    "MunifTanjim/nui.nvim",
  },
}

Environment

I use nvim 0.10.3 ubuntu 22.04

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
  },
})

menash134 avatar Feb 03 '25 13:02 menash134

same problem

lhybdv avatar Feb 08 '25 00:02 lhybdv

getting 404 here at my side.

diegoulloao avatar Feb 09 '25 18:02 diegoulloao

same, I setup with deepseek, send question response 401 Error: 'API request failed with status 401. Body: "Authentication Fails (auth header format should be Bearer sk-...)"'

ndzuki avatar Feb 12 '25 09:02 ndzuki

Should be a duplicate of #697

skt041959 avatar Feb 13 '25 10:02 skt041959

Try setting the disable tools field in opts

opts = {
  provider = "copilot",
  copilot = {
    disable_tools = false,
  },
}

conig avatar Mar 24 '25 22:03 conig

Try setting the disable tools field in opts

opts = {
  provider = "copilot",
  copilot = {
    disable_tools = false,
  },
}

with disable_tools = true, it works now

sudo-tee avatar Mar 25 '25 14:03 sudo-tee