feat: Unify account refresh and random retry runtime behavior#494
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
random策略:当account.refresh.enabled=false时,系统切换到随机选号模式,基于池级冷却和单号并发上限工作,不再依赖额度评分。account.refresh.basic_interval_sec、super_interval_sec、heavy_interval_sec,移除独立的account.random冷却配置入口与后台配置项。random模式下仍会触发 upstream quota probe 的问题,确保自动重试模式不再主动探测额度;同时保留失败记录、401 失效处理和本地状态更新逻辑。account.refresh.enabled后,当前进程会立即同步 selection strategy 和 refresh scheduler,/admin/api/status与账户管理页无需重启即可反映最新模式。Testing
uv run python -m compileall app/control/account/runtime.py app/control/account/scheduler.py app/main.py app/products/web/admin/__init__.py app/control/account/quota_defaults.py app/control/account/refresh.py app/dataplane/account/__init__.py app/products/openai/chat.pyuv run ruff check app/control/account/runtime.py app/control/account/scheduler.py app/main.py app/products/web/admin/__init__.py app/control/account/quota_defaults.py app/control/account/refresh.py app/dataplane/account/__init__.py app/products/openai/chat.pyaccount.refresh.enabled后,确认/admin/api/status会立即从random切到quota,并同步启动 scheduler。Related