Skip to content

fix(quota): route remaining console quota reads through the connection proxy - #16344

Open
maxmad64bis wants to merge 2 commits into
diegosouzapw:release/v3.8.52from
maxmad64bis:fix/quota-fetchers-remaining-through-connection-proxy
Open

maxmad64bis wants to merge 2 commits into
diegosouzapw:release/v3.8.52from
maxmad64bis:fix/quota-fetchers-remaining-through-connection-proxy

Conversation

@maxmad64bis

@maxmad64bis maxmad64bis commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #15885. Only the last commit is this PR's; I'll rebase once it lands.

⚠️ base-red inherited: #15306

Summary

Quota reads for nine providers leave the direct address while the same connection's requests use its assigned proxy. This change routes those nine readers through the connection proxy, so a reading with a proxy assigned leaves by the proxy and a reading without one still fetches directly. The provider limits screen shows the same data over the new network path — it's the same reading by proxy.

Related Issues

Target Branch

  • Base is the active release/v3.8.x branch (the highest open release/v*), not main
  • New feature? From 3.8.55 on it is held with the v4-feature label for the v4 channel

Validation

  • Change type: routing
  • Focused tests and category gates from the golden path
  • npm run lint
  • Reconciled with the current active release base; focused checks rerun afterward
  • Production-code changes include a new or updated automated test in this PR

Tests Added Or Updated

  • tests/unit/quota-fetchers-connection-proxy.test.ts — nine per-provider tests, one per remaining reader, plus a shared no-auth invalidation test and a static guard that fails naming any reader that calls fetch outside the helper.

Coverage Notes

  • open-sse/services/jinaQuotaFetcher.ts — covered by jina quota reads inside the proxy context.
  • open-sse/services/llmgatewayQuotaFetcher.ts — covered by llmgateway quota reads inside the proxy context.
  • open-sse/services/lyceumQuotaFetcher.ts — covered by lyceum quota reads inside the proxy context.
  • open-sse/services/moonshotQuotaFetcher.ts — covered by moonshot quota reads inside the proxy context.
  • open-sse/services/newApiAggregatorQuotaFetcher.ts — covered by new-api aggregator quota reads inside the proxy context.
  • open-sse/services/opencodeQuotaFetcher.ts — covered by opencode quota reads inside the proxy context and opencode quota invalidation clears the shared no-auth reading.
  • open-sse/services/openrouterQuotaFetcher.ts — covered by openrouter quota reads inside the proxy context.
  • open-sse/services/tavilyQuotaFetcher.ts — covered by tavily quota reads inside the proxy context.
  • open-sse/services/v0QuotaFetcher.ts — covered by v0 quota reads inside the proxy context.

Reviewer Notes

  • Merge: lands after fix(quota): route quota fetcher reads through the connection proxy #15885 — it shares the helper file only.
  • Behavior: with a proxy assigned, quota reads for these nine providers now leave by the proxy instead of the direct address, and without one the direct fetch is unchanged. opencode reads without a stored identifier use the shared no-auth fallback instead of reporting an unknown reading.

@maxmad64bis
maxmad64bis force-pushed the fix/quota-fetchers-remaining-through-connection-proxy branch from f408227 to eec7405 Compare October 11, 2026 13:26
@maxmad64bis
maxmad64bis marked this pull request as ready for review October 11, 2026 13:48
@maxmad64bis
maxmad64bis marked this pull request as draft October 12, 2026 08:28
@maxmad64bis
maxmad64bis force-pushed the fix/quota-fetchers-remaining-through-connection-proxy branch 2 times, most recently from 202169c to f63fe06 Compare October 12, 2026 08:53
@maxmad64bis
maxmad64bis marked this pull request as ready for review October 12, 2026 09:24
Console quota reads used a direct fetch; they now run inside the assigned connection proxy context with no direct fallback.
…n proxy

Console quota reads used a direct fetch; they now run inside the assigned connection proxy context with no direct fallback.
@maxmad64bis
maxmad64bis marked this pull request as draft October 16, 2026 20:30
@maxmad64bis
maxmad64bis force-pushed the fix/quota-fetchers-remaining-through-connection-proxy branch from f63fe06 to 656ba2c Compare October 16, 2026 20:30
@maxmad64bis
maxmad64bis marked this pull request as ready for review October 16, 2026 20:52

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant