diff --git a/lua/avante/providers/openai.lua b/lua/avante/providers/openai.lua index 9ab6872..0b4e053 100644 --- a/lua/avante/providers/openai.lua +++ b/lua/avante/providers/openai.lua @@ -285,17 +285,6 @@ M.parse_curl_args = function(provider, prompt_opts) -- Add appid header if configured if base.bce_appid then headers["appid"] = base.bce_appid end - if P.env.require_api_key(base) then - local api_key = provider.parse_api_key() - if api_key == nil then - error(Config.provider .. " API key is not set, please set it in your environment variable or config file") - end - headers["Authorization"] = "Bearer " .. api_key - end - local headers = { - ["Content-Type"] = "application/json", - } - if P.env.require_api_key(base) then local api_key = provider.parse_api_key() if api_key == nil then