From 26409d94b5a0a51fcd512571403d26cca12033da Mon Sep 17 00:00:00 2001 From: kaiix Date: Mon, 26 Aug 2024 18:35:04 +0800 Subject: [PATCH] fix: don't automatically setup openai when its not the configured provider (#237) --- lua/avante/providers/init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/avante/providers/init.lua b/lua/avante/providers/init.lua index 8e59b8a..e9655f9 100644 --- a/lua/avante/providers/init.lua +++ b/lua/avante/providers/init.lua @@ -251,7 +251,9 @@ M = setmetatable(M, { end end - t[k].setup() + if k == Config.provider then + t[k].setup() + end return t[k] end,