Repository navigation
fix(proxies): make the 429 set-aside curve tunable via environment - #14655
Merged
diegosouzapw merged 1 commit intoSep 24, 2026
Merged
diegosouzapw merged 1 commit into
diegosouzapw merged 1 commit into
Conversation
maxmad64bis
force-pushed
the
fix/refusal-cooldown-tunable
branch
from
September 23, 2026 15:30
0c03cd6 to
747cd44
Compare
maxmad64bis
marked this pull request as ready for review
September 23, 2026 15:34
4 of 5 tasks
maxmad64bis
force-pushed
the
fix/refusal-cooldown-tunable
branch
from
September 23, 2026 22:28
747cd44 to
7697144
Compare
Collaborator
|
Nicely done — making the 429 set-aside curve tunable via env instead of hardcoded, with proper |
This was referenced Sep 24, 2026
diegosouzapw
merged commit Sep 24, 2026
2dcfe53
into
cheaper-inference:release/v3.8.51
9 of 16 checks passed
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
Requests that hit a provider 429 keep serving the same egress for 2 minutes before backing off, even when the refusal persists 5-15 minutes. The set-aside curve (
ip_quota_429: 120 s base, doubling, 3 600 s cap) is hardcoded, so operators cannot tune it to their provider. After this change the base and cap are readable from the environment with the current values as defaults, so unset keeps the current doubling curve unchanged.Related Issues
No linked issue — hardening of the merged refusal-memory mechanism (#13578) with no new default.
Validation
npm run lint— ESLint on the touched files is clean; the full run is red on the base (🔴 Release branch not green: release/v3.8.51 #14547)Tests Added Or Updated
tests/unit/proxy-refusal-memory-quota-tuning.test.ts(new, 7 cases: default curve, bounded values, out-of-range/unreadable fallback with warning, max-below-base fallback, cap never zero).tests/unit/proxy-refusal-memory.test.ts(14 tests).Coverage Notes
Unit tests cover the change (
open-sse/utils/proxyRefusalMemory.ts): default periods without variables, bounded doubling with variables set, fallback to defaults with a single startup warning on invalid input, and the max-below-base fallback. No coverage movement in touched files beyond the new test.Reviewer Notes
PROXY_QUOTA_429_BASE_MS(default120000) andPROXY_QUOTA_429_MAX_MS(default3600000) are read once at startup and bounded to1000..3600000; lowering the cap also shortens streak forgetting since entries purge at twice the cap after expiry.auggie.tsandprojectCombo.ts, none touched here (git diffempty on those files), and trace back to the base-red branch state (🔴 Release branch not green: release/v3.8.51 #14547).