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

bug: unsupported_country_region_territory but still got result

Open Act0r1 opened this issue 7 months ago • 0 comments

Describe the bug

When i open avante, then submit some text, i got error


summarize chat thread title failed: {
  code = "unsupported_country_region_territory",
  message = "Country, region, or territory not supported",
  param = vim.NIL,
  type = "request_forbidden"
}

But, after a lot of errors i close avante window, and open again, i saw that model return answer

To reproduce

No response

Expected behavior

No response

Installation method

Use lazy.nvim:

return {
    {
        "yetone/avante.nvim",
        event = "VeryLazy",
        lazy = false,
        version = false, -- set this if you want to always pull the latest change
        opts = {
            provider = "deepseek",
            -- provider = "openai",
            -- aihubmix = {
            --     model = "gpt-4o-2024-11-20",
            -- },
            vendors = {
                deepseek = {
                    __inherited_from = "openai",
                    api_key_name = "DEEPSEEK_API_KEY",
                    endpoint = "https://api.deepseek.com",
                    model = "deepseek-coder",
                },
                -- openai = {
                --     endpoint = "https://aihubmix.com/v1",
                --     model = "claude-3-5-sonnet-20240620",
                --     temperature = 0,
                --     max_tokens = 4096,
                -- },
            },
        },
        -- 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",
            --- The below dependencies are optional,
            "nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons
            "zbirenbaum/copilot.lua", -- for providers='copilot'
            {
                -- support for image pasting
                "HakonHarnes/img-clip.nvim",
                event = "VeryLazy",
                opts = {
                    -- recommended settings
                    default = {
                        embed_image_as_base64 = false,
                        prompt_for_file_name = false,
                        drag_and_drop = {
                            insert_mode = true,
                        },
                        -- required for Windows users
                        use_absolute_path = true,
                    },
                },
            },
            {
                -- Make sure to set this up properly if you have lazy=true
                "MeanderingProgrammer/render-markdown.nvim",
                opts = {
                    file_types = { "markdown", "Avante" },
                },
                ft = { "markdown", "Avante" },
            },
        },
    },
}

Environment

NVIM v0.11.1 Build type: Release LuaJIT 2.1.1744318430 Run "nvim -V1 -v" for more info

Platform: Darvin

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

Act0r1 avatar May 10 '25 15:05 Act0r1