mirror of
https://github.com/justlovemaki/AIClient-2-API.git
synced 2026-04-25 17:35:58 +03:00
[PR #229] [MERGED] feat(config): 添加坏凭证切换最大重试次数配置项,支持自定义配置,默认5。 #310
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#310
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?
📋 Pull Request Information
Original PR: https://github.com/justlovemaki/AIClient-2-API/pull/229
Author: @leonaii
Created: 1/13/2026
Status: ✅ Merged
Merged: 1/13/2026
Merged by: @justlovemaki
Base:
main← Head:main📝 Commits (1)
4772a6efeat(config): 添加凭证切换最大重试次数配置项📊 Changes
5 files changed (+24 additions, -1 deletions)
View changed files
📝
src/core/config-manager.js(+1 -0)📝
src/ui-modules/config-api.js(+2 -0)📝
src/utils/common.js(+7 -1)📝
static/app/config-manager.js(+6 -0)📝
static/components/section-config.html(+8 -0)📄 Description
📋 概述
新增
CREDENTIAL_SWITCH_MAX_RETRIES配置项,允许用户自定义凭证切换的最大重试次数,提升系统在多凭证场景下的容错能力。🎯 动机与背景
当使用 Provider Pool(号池)功能时,系统会在遇到认证错误(401/403)后自动切换到其他健康凭证进行重试。此前重试次数硬编码为 2 次,对于拥有大量凭证的用户来说可能不够灵活。本次更新将该值改为可配置,默认值提升至 5 次。
✨ 变更内容
src/core/config-manager.jsCREDENTIAL_SWITCH_MAX_RETRIES配置初始化,默认值为 5src/ui-modules/config-api.jssrc/utils/common.jsstatic/app/config-manager.jsstatic/components/section-config.html🔧 技术细节
配置初始化:
使用方式:
📝 重试机制说明
本系统存在两层重试机制:
REQUEST_MAX_RETRIESCREDENTIAL_SWITCH_MAX_RETRIES🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.