fix: retry when rate limited (#1417)

This commit is contained in:
yetone
2025-02-27 12:52:58 +08:00
committed by GitHub
parent e69e7eceeb
commit 5abe579019
3 changed files with 25 additions and 1 deletions

View File

@@ -231,10 +231,11 @@ vim.g.avante_login = vim.g.avante_login
---@field usage? AvanteLLMUsage
---
---@class AvanteLLMStopCallbackOptions
---@field reason "complete" | "tool_use" | "error"
---@field reason "complete" | "tool_use" | "error" | "rate_limit"
---@field error? string | table
---@field usage? AvanteLLMUsage
---@field tool_use_list? AvanteLLMToolUse[]
---@field retry_after? integer
---
---@alias AvanteStreamParser fun(line: string, handler_opts: AvanteHandlerOptions): nil
---@alias AvanteLLMStartCallback fun(opts: AvanteLLMStartCallbackOptions): nil