mirror of
https://github.com/justlovemaki/AIClient-2-API.git
synced 2026-04-25 17:35:58 +03:00
[GH-ISSUE #129] [Feature Request] Provider Pool 跨类型 Fallback:当 gemini-cli-oauth 配额耗尽时自动切换到 gemini-antigravity #105
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/AIClient-2-API-justlovemaki#105
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @chchuj on GitHub (Dec 23, 2025).
Original GitHub issue: https://github.com/justlovemaki/AIClient-2-API/issues/129
[Feature Request] Provider Pool 跨类型 Fallback:当某一类型账号配额耗尽时自动切换到其他兼容类型
功能描述 (Feature Description)
背景:在使用 Provider Pool 功能时,我配置了多个
gemini-cli-oauth账号进行轮询负载均衡,同时也配置了gemini-antigravity账号。需求:当某一 Provider Type(如
gemini-cli-oauth)下的所有账号都因 429 配额耗尽或被标记为 unhealthy 时,能够自动 fallback 到另一个兼容的 Provider Type(如gemini-antigravity),而不是直接返回错误。当前行为 (Current Behavior)
gemini-cli-oauth池中的所有账号都耗尽 RPD 配额时,请求直接失败并返回 429 错误gemini-antigravity池中有可用账号,也不会被使用预期行为 (Expected Behavior)
预期逻辑:
建议实现方式 (Suggested Implementation)
方案 A:在
config.json中增加全局 fallback 链配置:方案 B:在
provider_pools.json的类型级别配置:环境信息 (Environment)
使用场景 (Use Case)
批量任务场景下,单一 Provider Type 的免费 RPD 配额容易在短时间内耗尽。通过跨类型 Fallback,可以充分利用多种 Provider 的独立配额,提高整体可用性和吞吐量。
@justlovemaki commented on GitHub (Dec 23, 2025):
antigravity 和 gemini-cli 模型不一致怎么解决呢?
antigravity 出问题又需不需要再次降级到其它提供商呢?
@chchuj commented on GitHub (Dec 23, 2025):
感谢回复!针对这两个问题,我的想法是:
1. 模型不一致问题
实际上
gemini-cli-oauth和gemini-antigravity支持的模型有很大重叠:而且一般为了业务输出稳定,都会选择相同或相近的模型来降级。
建议方案:
supportedModels列表用于预检查2. 多级降级问题
是的,可以支持链式 fallback:
建议方案:
fallbackTo改为数组,按顺序尝试:遍历逻辑:
这样用户可以根据自己的需求配置降级链,同时保持向后兼容(不配置则不启用 fallback)。
@justlovemaki commented on GitHub (Dec 23, 2025):
已发布