Skip to content

[Bug]Tavily 多 Key 轮询不会在失败时切换下一个 Key #8886

@AlanBacker

Description

@AlanBacker

What happened / 发生了什么

Tavily 配置多个 Key 后,目前看起来只是每次调用按顺序取一个 Key。
问题是:如果本次轮到的 Key 已失效、额度用完或被限流,搜索会直接失败,不会继续尝试下一个 Key。

Reproduce / 如何复现?

开启 Web Search,provider 选择 Tavily
在 websearch_tavily_key 里填两个 Key
第一个填失效或额度耗尽的 Key,第二个填可用 Key
触发一次 web_search_tavily
结果会直接报 Tavily 搜索失败,而不是继续用第二个 Key

AstrBot version, deployment method (e.g., Windows Docker Desktop deployment), provider used, and messaging platform used. / AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器

v4.25.1 Linux uv

OS

Linux

Logs / 报错日志

Exception: Tavily web search failed: {"detail":{"error":"This request exceeds your plan's set usage limit. Please upgrade your plan or contact support@tavily.com"}}, status: 432

Are you willing to submit a PR? / 你愿意提交 PR 吗?

  • Yes!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:providerThe bug / feature is about AI Provider, Models, LLM Agent, LLM Agent Runner.bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions