Repository navigation
feat: configurable 429 rate-limit degradation threshold - #3
Closed
teamilkman wants to merge 2 commits into
Closed
teamilkman wants to merge 2 commits into
teamilkman wants to merge 2 commits into
Conversation
A single upstream 429 used to immediately mark an account as cooling. Add a rate_limit_threshold setting (admin settings page + ZCODE_RATE_LIMIT_THRESHOLD, default 1 = previous behavior): accounts only enter cooling after N consecutive 429s, and 0 disables degradation entirely. 429s still switch to the next account for the current request in all cases. The consecutive counter resets on a successful request and when cooling is applied. Also patch store.update_account in tests that stream success responses so running the suite no longer persists test accounts into the live data/accounts.db. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The old admin settings.html was replaced by the React SPA upstream; add the rate_limit_threshold field to frontend settings page and the SettingsResponse type. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
teamilkman
force-pushed
the
feat/rate-limit-threshold
branch
from
September 6, 2026 13:03
4566ef8 to
5766aef
Compare
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
ZCODE_RATE_LIMIT_THRESHOLD,默认 1 保持现有行为):账号连续收到 N 次上游 429 后才标记为「限流」冷却;设为 0 则完全不因 429 降级(429 仍会为当前请求切换下一个账号,只是不进入冷却)rate_limit_count,成功请求后清零;进入冷却时归零重新计数。主网关/v1/messages与/async/*两处 429 路径使用同一套阈值逻辑,503 行为不变data/accounts.db写入测试账号;已补上store.update_account的 patchTest plan
data/accounts.db无测试账号残留🤖 Generated with Claude Code