feat(providers): fail gracefully when a provider is misconfigured (#2768)

This commit is contained in:
Dmitry Torokhov
2025-10-15 03:43:55 -07:00
committed by GitHub
parent 250b7a26b4
commit 0716819a0e
9 changed files with 61 additions and 14 deletions

View File

@@ -230,7 +230,7 @@ vim.g.avante_login = vim.g.avante_login
---@alias AvanteMessagesParser fun(self: AvanteProviderFunctor, opts: AvantePromptOptions): AvanteChatMessage[]
---
---@class AvanteCurlOutput: {url: string, proxy: string, insecure: boolean, body: table<string, any> | string, headers: table<string, string>, rawArgs: string[] | nil}
---@alias AvanteCurlArgsParser fun(self: AvanteProviderFunctor, prompt_opts: AvantePromptOptions): AvanteCurlOutput
---@alias AvanteCurlArgsParser fun(self: AvanteProviderFunctor, prompt_opts: AvantePromptOptions): (AvanteCurlOutput | nil)
---
---@alias AvanteResponseParser fun(self: AvanteProviderFunctor, ctx: any, data_stream: string, event_state: string, opts: AvanteHandlerOptions): nil
---