diff --git a/lua/avante/llm.lua b/lua/avante/llm.lua index 7917469..500a454 100644 --- a/lua/avante/llm.lua +++ b/lua/avante/llm.lua @@ -732,7 +732,7 @@ function M._stream(opts) return end local new_opts = vim.tbl_deep_extend("force", opts, { - history_messages = opts.get_history_messages(), + history_messages = opts.get_history_messages and opts.get_history_messages() or {}, }) if provider.get_rate_limit_sleep_time then local sleep_time = provider:get_rate_limit_sleep_time(resp_headers)