feat(resilience): expose providerQuotaOverrides via /api/resilience - #9714
diegosouzapw merged 2 commits into
Conversation
|
Thanks for the PR. Please address the mandatory items (tests and/or merge blockers) in this branch, then rerun checks before /merge-prs. |
3 similar comments
|
Thanks for the PR. Please address the mandatory items (tests and/or merge blockers) in this branch, then rerun checks before /merge-prs. |
|
Thanks for the PR. Please address the mandatory items (tests and/or merge blockers) in this branch, then rerun checks before /merge-prs. |
|
Thanks for the PR. Please address the mandatory items (tests and/or merge blockers) in this branch, then rerun checks before /merge-prs. |
|
Obrigado pelo PR. Mantive a revisão de
|
|
Synced with the current Verified in the merged tree:
|
de33b2c
into
diegosouzapw:release/v3.8.50
…iegosouzapw#9714) Co-authored-by: herjarsa <herjarsa@users.noreply.github.com>
Problem
\providerQuotaOverrides\ (per-provider RPM/concurrency overrides, #6846 Phase 1) can only be applied at startup via \initializeRateLimits()\ and cannot be configured through any REST API:
equestQueue\ on the hot path, so even a future schema fix would not take effect until restart.
Solution
Expose the existing override mechanism through /api/resilience:
Tests
New \ ests/unit/resilience-settings-provider-quota-overrides.test.ts\ (11 cases): schema accept/reject (incl. lone-override body and strict-entry rejection), merge/normalize behavior, resolve round-trip, and route wiring (GET/PATCH response fields + hot-reload call). All pass; existing resilience suites (24 tests incl.
esilience-tab-response-fields) remain green.
Notes
While verifying the hot path I found the docstring on \setProviderQuotaOverrides\ (\open-sse/services/providerDefaultRateLimit.ts) is stale: it claims the function is called by \initializeRateLimitProtection()\ and \�pplyRequestQueueSettings()\ — the real caller is \initializeRateLimits(), and \�pplyRequestQueueSettings()\ does not call it. The docstring is left untouched in this PR (comment-only fix could follow separately).