Merge pull request #679 from DaydreamCoding/feat/account-rpm-limit

feat: 添加账号级别 RPM(每分钟请求数)限流功能
This commit is contained in:
Wesley Liddick
2026-02-28 22:37:10 +08:00
committed by GitHub
27 changed files with 1174 additions and 31 deletions

View File

@@ -1616,7 +1616,19 @@ export default {
sessions: {
full: 'Active sessions full, new sessions must wait (idle timeout: {idle} min)',
normal: 'Active sessions normal (idle timeout: {idle} min)'
}
},
rpm: {
full: 'RPM limit reached',
warning: 'RPM approaching limit',
normal: 'RPM normal',
tieredNormal: 'RPM limit (Tiered) - Normal',
tieredWarning: 'RPM limit (Tiered) - Approaching limit',
tieredStickyOnly: 'RPM limit (Tiered) - Sticky only | Buffer: {buffer}',
tieredBlocked: 'RPM limit (Tiered) - Blocked | Buffer: {buffer}',
stickyExemptNormal: 'RPM limit (Sticky Exempt) - Normal',
stickyExemptWarning: 'RPM limit (Sticky Exempt) - Approaching limit',
stickyExemptOver: 'RPM limit (Sticky Exempt) - Over limit, sticky only'
},
},
tempUnschedulable: {
title: 'Temp Unschedulable',
@@ -1831,6 +1843,22 @@ export default {
idleTimeoutPlaceholder: '5',
idleTimeoutHint: 'Sessions will be released after idle timeout'
},
rpmLimit: {
label: 'RPM Limit',
hint: 'Limit requests per minute to protect upstream accounts',
baseRpm: 'Base RPM',
baseRpmPlaceholder: '15',
baseRpmHint: 'Max requests per minute, 0 or empty means no limit',
strategy: 'RPM Strategy',
strategyTiered: 'Tiered Model',
strategyStickyExempt: 'Sticky Exempt',
strategyTieredHint: 'Green → Yellow → Sticky only → Blocked, progressive throttling',
strategyStickyExemptHint: 'Only sticky sessions allowed when over limit',
strategyHint: 'Tiered: gradually restrict when exceeded; Sticky Exempt: existing sessions unrestricted',
stickyBuffer: 'Sticky Buffer',
stickyBufferPlaceholder: 'Default: 20% of base RPM',
stickyBufferHint: 'Extra requests allowed for sticky sessions after exceeding base RPM. Leave empty to use default (20% of base RPM, min 1)'
},
tlsFingerprint: {
label: 'TLS Fingerprint Simulation',
hint: 'Simulate Node.js/Claude Code client TLS fingerprint'