Skip to content

feat(proxies): accept operator-provided dated egress observations for pool members - #15314

Merged
diegosouzapw merged 179 commits into
cheaper-inference:release/v3.8.52from
maxmad64bis:feat/operator-egress-observations
Oct 6, 2026
Merged

diegosouzapw merged 179 commits into
cheaper-inference:release/v3.8.52from
maxmad64bis:feat/operator-egress-observations

Conversation

@maxmad64bis

@maxmad64bis maxmad64bis commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ base-red inherited: #15306

Summary

Adds an opt-in way for an operator to tell OmniRoute which exit addresses a pool member currently uses, with the date of the observation. Today the only source is OmniRoute's own echo probe, cached for a few minutes, which is wrong as soon as a member switches nodes behind one port. With PROXY_OPERATOR_EGRESS_ENABLED on, fresh rows are used for ordering and shown in the pool view as "operator-provided, dated"; a stale row counts as absent, and the freshest observation wins. Off by default: no behavior change without the flag.

Related Issues

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 — rebased on the current release base; focused tests rerun
  • Production-code changes include a new or updated automated test in this PR

Tests Added Or Updated

  • tests/unit/proxy-operator-egress-store.test.ts (new, 10 cases: schema rejections, idempotent upsert, freshest-wins, expiry, caps and eviction, concurrent pushes)
  • tests/unit/proxy-operator-egress-route.test.ts (new, 11 cases: 404 flag off, 401 without auth, 400 all-rejected, 200 with ignored counting)
  • tests/unit/proxy-operator-egress-reader.test.ts (new, 7 cases: 3-address set, freshness crossover both ways, flag-off identical, cache-then-expire)
  • tests/unit/proxy-operator-egress-migration.test.ts (new, 1 case: table, key, index)
  • tests/unit/proxy-operator-egress-i18n.test.ts (new, 1 case: keys present in all locales, component wiring)
  • tests/unit/proxy-pool-member-egress-route.test.ts (updated: source: null in one pinned body)
  • tests/unit/ui/PoolMemberEgressLines.test.tsx (updated: operator line, forward compatibility)
  • tests/unit/feature-flags-settings.test.ts + tests/unit/server-owned-tool-loop-flag.test.ts (updated: flag count 80 to 81)

Coverage Notes

  • src/lib/db/proxyOperatorEgress.ts: store, reader, route, migration tests
  • src/lib/db/proxies/rotation.ts: reader tests (merged set, freshest, flag-off path)
  • src/lib/proxyPoolEgressObservation.ts: reader and member-egress route tests
  • src/app/api/settings/proxies/operator-egress/route.ts: route tests
  • src/app/api/settings/proxies/pool/member-egress/route.ts: member-egress route tests
  • src/app/(dashboard)/dashboard/settings/components/PoolMemberEgressLines.tsx: UI tests
  • src/shared/network/egressAddress.ts: store and reader tests via validation paths
  • src/shared/constants/featureFlagDefinitions.ts + src/shared/utils/featureFlags.ts + src/shared/validation/schemas/proxy.ts: pinned by flag count and route rejection tests

Reviewer Notes

diegosouzapw and others added 9 commits October 6, 2026 11:33
…purify 3.4.16 and patched npm-bundled copies in the image (cheaper-inference#15325)

- next/eslint-config-next 16.3.5 -> 16.3.6 (critical RCE in next/og ImageResponse).
- override axios ^1.20.0 so ibm-cloud-sdk-core's exact 1.18.0 pin cannot keep the vulnerable copy.
- @grpc/grpc-js 1.14.5, dompurify 3.4.16 via lockfile.
- Dockerfile npm-internals overlay: undici 6.29.0, brace-expansion 5.0.12, ip-address 10.7.3.
node-forge has no patched release yet (dev-only, via promptfoo -> jks-js).
…aper-inference#15003)

Validated in a combined 14-PR board on the current release tip (112313a): 111 focused tests, typecheck:core, open-sse typecheck, gate-manifest, mutation-test-coverage, file-size, changelog-integrity, complexity, env-doc-sync, test-discovery, vitest-exclusions, error-helper, cli-i18n and the i18n new-keys/ui-coverage gates green. Thank you for the contribution.
…inference#15225)

Validated in a combined 14-PR board on the current release tip (112313a): 111 focused tests, typecheck:core, open-sse typecheck, gate-manifest, mutation-test-coverage, file-size, changelog-integrity, complexity, env-doc-sync, test-discovery, vitest-exclusions, error-helper, cli-i18n and the i18n new-keys/ui-coverage gates green. Thank you for the contribution.
… Rule cheaper-inference#16 (cheaper-inference#15389)

Validated in a combined 14-PR board on the current release tip (112313a): 111 focused tests, typecheck:core, open-sse typecheck, gate-manifest, mutation-test-coverage, file-size, changelog-integrity, complexity, env-doc-sync, test-discovery, vitest-exclusions, error-helper, cli-i18n and the i18n new-keys/ui-coverage gates green. Thank you for the contribution.
… text (cheaper-inference#15399)

Validated in a combined 14-PR board on the current release tip (112313a): 111 focused tests, typecheck:core, open-sse typecheck, gate-manifest, mutation-test-coverage, file-size, changelog-integrity, complexity, env-doc-sync, test-discovery, vitest-exclusions, error-helper, cli-i18n and the i18n new-keys/ui-coverage gates green. Thank you for the contribution.
…alog (cheaper-inference#15396)

Validated in a combined 14-PR board on the current release tip (112313a): 111 focused tests, typecheck:core, open-sse typecheck, gate-manifest, mutation-test-coverage, file-size, changelog-integrity, complexity, env-doc-sync, test-discovery, vitest-exclusions, error-helper, cli-i18n and the i18n new-keys/ui-coverage gates green. Thank you for the contribution.
…heaper-inference#15395)

Validated in a combined 14-PR board on the current release tip (112313a): 111 focused tests, typecheck:core, open-sse typecheck, gate-manifest, mutation-test-coverage, file-size, changelog-integrity, complexity, env-doc-sync, test-discovery, vitest-exclusions, error-helper, cli-i18n and the i18n new-keys/ui-coverage gates green. Thank you for the contribution.
…per-inference#15378)

Validated in a combined 14-PR board on the current release tip (112313a): 111 focused tests, typecheck:core, open-sse typecheck, gate-manifest, mutation-test-coverage, file-size, changelog-integrity, complexity, env-doc-sync, test-discovery, vitest-exclusions, error-helper, cli-i18n and the i18n new-keys/ui-coverage gates green. Thank you for the contribution.
cheaper-inference#15432)

Validated in a combined 14-PR board on the current release tip (112313a): 111 focused tests, typecheck:core, open-sse typecheck, gate-manifest, mutation-test-coverage, file-size, changelog-integrity, complexity, env-doc-sync, test-discovery, vitest-exclusions, error-helper, cli-i18n and the i18n new-keys/ui-coverage gates green. Thank you for the contribution.
QuangBlue and others added 26 commits October 6, 2026 19:24
…heaper-inference#15413)

Onda 6. Este squash entra com o crédito de @QuangBlue (fix(kiro): stop discovery from stamping a fake 200k context window).

O board único validou os 19 PRs (sem o cheaper-inference#15412): file-size OK, changelog OK, i18n drift OK, typecheck:core OK, complexity e cognitive dentro do baseline. Testes focados: 390 passaram, 1 skip. O teste novo de GHE Copilot Sonnet 5.5 falhou no head original e foi corrigido no board; esse ajuste entra com o cheaper-inference#15478, fora deste squash.

O rebaseline de file-size e o adopt de i18n ficam num follow-up.

⚠️ base-red inherited: cheaper-inference#15306

Obrigado, @QuangBlue.
…er-inference#15332)

Onda 6. Este squash entra com o crédito de @QuangBlue (fix(api): keep Next's upgrade listener off the run-next server).

O board único validou os 19 PRs (sem o cheaper-inference#15412): file-size OK, changelog OK, i18n drift OK, typecheck:core OK, complexity e cognitive dentro do baseline. Testes focados: 390 passaram, 1 skip. O teste novo de GHE Copilot Sonnet 5.5 falhou no head original e foi corrigido no board; esse ajuste entra com o cheaper-inference#15478, fora deste squash.

O rebaseline de file-size e o adopt de i18n ficam num follow-up.

⚠️ base-red inherited: cheaper-inference#15306

Obrigado, @QuangBlue.
… runs (cheaper-inference#15331)

Onda 6. Este squash entra com o crédito de @QuangBlue (fix(api): standalone server owns SIGTERM so graceful-shutdown cleanup runs).

O board único validou os 19 PRs (sem o cheaper-inference#15412): file-size OK, changelog OK, i18n drift OK, typecheck:core OK, complexity e cognitive dentro do baseline. Testes focados: 390 passaram, 1 skip. O teste novo de GHE Copilot Sonnet 5.5 falhou no head original e foi corrigido no board; esse ajuste entra com o cheaper-inference#15478, fora deste squash.

O rebaseline de file-size e o adopt de i18n ficam num follow-up.

⚠️ base-red inherited: cheaper-inference#15306

Obrigado, @QuangBlue.
…ference#15597)

Onda 6. Este squash entra com o crédito de @insoln (fix(sse): scope type-only context errors in combo streams).

O board único validou os 19 PRs (sem o cheaper-inference#15412): file-size OK, changelog OK, i18n drift OK, typecheck:core OK, complexity e cognitive dentro do baseline. Testes focados: 390 passaram, 1 skip. O teste novo de GHE Copilot Sonnet 5.5 falhou no head original e foi corrigido no board; esse ajuste entra com o cheaper-inference#15478, fora deste squash.

O rebaseline de file-size e o adopt de i18n ficam num follow-up.

⚠️ base-red inherited: cheaper-inference#15306

Obrigado, @insoln.
…ate (cheaper-inference#15598)

Onda 6. Este squash entra com o crédito de @insoln (fix(sse): accept first-party Claude empty end_turn in combo quality gate).

O board único validou os 19 PRs (sem o cheaper-inference#15412): file-size OK, changelog OK, i18n drift OK, typecheck:core OK, complexity e cognitive dentro do baseline. Testes focados: 390 passaram, 1 skip. O teste novo de GHE Copilot Sonnet 5.5 falhou no head original e foi corrigido no board; esse ajuste entra com o cheaper-inference#15478, fora deste squash.

O rebaseline de file-size e o adopt de i18n ficam num follow-up.

⚠️ base-red inherited: cheaper-inference#15306

Obrigado, @insoln.
…-inference#12797) (cheaper-inference#15557)

Onda 6. Este squash entra com o crédito de @insoln (fix(sse): stabilize standalone compression worker resolution (cheaper-inference#12797)).

O board único validou os 19 PRs (sem o cheaper-inference#15412): file-size OK, changelog OK, i18n drift OK, typecheck:core OK, complexity e cognitive dentro do baseline. Testes focados: 390 passaram, 1 skip. O teste novo de GHE Copilot Sonnet 5.5 falhou no head original e foi corrigido no board; esse ajuste entra com o cheaper-inference#15478, fora deste squash.

O rebaseline de file-size e o adopt de i18n ficam num follow-up.

⚠️ base-red inherited: cheaper-inference#15306

Obrigado, @insoln.
…s-platform (cheaper-inference#15572)

Onda 6. Este squash entra com o crédito de @Junior-HJ (test(compression): make worker-specifier and RTK TOML assertions cross-platform).

O board único validou os 19 PRs (sem o cheaper-inference#15412): file-size OK, changelog OK, i18n drift OK, typecheck:core OK, complexity e cognitive dentro do baseline. Testes focados: 390 passaram, 1 skip. O teste novo de GHE Copilot Sonnet 5.5 falhou no head original e foi corrigido no board; esse ajuste entra com o cheaper-inference#15478, fora deste squash.

O rebaseline de file-size e o adopt de i18n ficam num follow-up.

⚠️ base-red inherited: cheaper-inference#15306

Obrigado, @Junior-HJ.
…namespaced root (cheaper-inference#15452)

Onda 6. Este squash entra com o crédito de @yourspraveen (fix(api): stop restricted-key /v1/models leaking aggregator rows via namespaced root).

O board único validou os 19 PRs (sem o cheaper-inference#15412): file-size OK, changelog OK, i18n drift OK, typecheck:core OK, complexity e cognitive dentro do baseline. Testes focados: 390 passaram, 1 skip. O teste novo de GHE Copilot Sonnet 5.5 falhou no head original e foi corrigido no board; esse ajuste entra com o cheaper-inference#15478, fora deste squash.

O rebaseline de file-size e o adopt de i18n ficam num follow-up.

⚠️ base-red inherited: cheaper-inference#15306

Obrigado, @yourspraveen.
… Go (cheaper-inference#15453)

Onda 6. Este squash entra com o crédito de @yourspraveen (fix(providers): keep a third-party agent's own User-Agent on OpenCode Go).

O board único validou os 19 PRs (sem o cheaper-inference#15412): file-size OK, changelog OK, i18n drift OK, typecheck:core OK, complexity e cognitive dentro do baseline. Testes focados: 390 passaram, 1 skip. O teste novo de GHE Copilot Sonnet 5.5 falhou no head original e foi corrigido no board; esse ajuste entra com o cheaper-inference#15478, fora deste squash.

O rebaseline de file-size e o adopt de i18n ficam num follow-up.

⚠️ base-red inherited: cheaper-inference#15306

Obrigado, @yourspraveen.
…fig auto table (cheaper-inference#15467)

Onda 6. Este squash entra com o crédito de @yourspraveen (docs(readme): list auto/subscription and auto/thrifty in the zero-config auto table).

O board único validou os 19 PRs (sem o cheaper-inference#15412): file-size OK, changelog OK, i18n drift OK, typecheck:core OK, complexity e cognitive dentro do baseline. Testes focados: 390 passaram, 1 skip. O teste novo de GHE Copilot Sonnet 5.5 falhou no head original e foi corrigido no board; esse ajuste entra com o cheaper-inference#15478, fora deste squash.

O rebaseline de file-size e o adopt de i18n ficam num follow-up.

⚠️ base-red inherited: cheaper-inference#15306

Obrigado, @yourspraveen.
…heaper-inference#15458)

Onda 6. Este squash entra com o crédito de @skygunner (fix(combo): keep declared priority order ahead of session stickiness).

O board único validou os 19 PRs (sem o cheaper-inference#15412): file-size OK, changelog OK, i18n drift OK, typecheck:core OK, complexity e cognitive dentro do baseline. Testes focados: 390 passaram, 1 skip. O teste novo de GHE Copilot Sonnet 5.5 falhou no head original e foi corrigido no board; esse ajuste entra com o cheaper-inference#15478, fora deste squash.

O rebaseline de file-size e o adopt de i18n ficam num follow-up.

⚠️ base-red inherited: cheaper-inference#15306

Obrigado, @skygunner.
…heaper-inference#15478)

Onda 6. Este squash entra com o crédito de @lorenzozanee (fix(providers): declare Claude target format for GHE Copilot models).

O board único validou o conjunto. O teste novo exige `targetFormat: "claude"` em todo modelo GHE Copilot cujo id começa com `claude-`. O catálogo da release já lista `claude-sonnet-5-5` sem esse campo; a linha foi acrescentada no fork para o teste passar, no mesmo formato das outras linhas Claude.

O rebaseline de file-size e o adopt de i18n ficam num follow-up, depois dos três PRs restantes da onda.

⚠️ base-red inherited: cheaper-inference#15306

Obrigado, @lorenzozanee.
…nce#15476)

Onda 6. Este squash entra com o crédito de @lorenzozanee (fix(providers): update the pinned Copilot CLI version).

O pin suportado passa de 1.0.88 para 1.0.91. A consulta ao registro npm, o cache de 6 horas e o timeout de 20s da release ficam. Uma versão mais nova continua substituindo o pin, e GITHUB_COPILOT_CLI_VERSION no ambiente continua vencendo os dois.

O rebaseline de file-size e o adopt de i18n ficam num follow-up.

⚠️ base-red inherited: cheaper-inference#15306

Obrigado, @lorenzozanee.
…rted prompt_tokens (cheaper-inference#15054)

Onda 6. Este squash entra com o crédito de @skygunner (fix(context): calibrate the chars/4 guard estimate with provider-reported prompt).

A calibração do cheaper-inference#14931 entra no caminho já dividido: estimativa de contexto, cauda de streaming e resposta não-streaming. O patch original em chatCore.ts não cabe mais nesse layout.

O rebaseline de file-size e o adopt de i18n ficam num follow-up.

⚠️ base-red inherited: cheaper-inference#15306

Obrigado, @skygunner.
…er-inference#15694)

Follow-up da onda 6. Nenhum código de produto.

Tetos medidos no tip depois dos squashes:

- `open-sse/executors/opencode.ts` 1518 → 1519 (cheaper-inference#15453)
- `tests/unit/combo/quota-weighted-strategy.test.ts` novo, congelado em 1217 (cheaper-inference#15480)

O adopt de i18n grava o hash atual de `README.md` (cheaper-inference#15541, cheaper-inference#15467) e `docs/reference/ENVIRONMENT.md` (cheaper-inference#15542). Não traduz.

File-size OK (171 congelados, 47 testes congelados). i18n drift PASS (sources=152, targets=10032).

⚠️ base-red inherited: cheaper-inference#15306
…rence#15535)

Correções já validadas no board. Este squash entra com o crédito de @HouMinXi (fix(combo): skip hedging when the request body is large).

O board único passou changelog, typecheck:core, complexity e cognitive. Os 5 testes de guide-settings que falham com HTTP 422 também falham no tip: o guard de escrita recusa o alvo fora de um mount quando `/.dockerenv` existe. Não é regressão deste PR.

O rebaseline de file-size dos arquivos que cresceram fica num follow-up, depois destes squashes.

⚠️ base-red inherited: cheaper-inference#15306

Obrigado, @HouMinXi.
…inference#15406)

Correções já validadas no board. Este squash entra com o crédito de @HouMinXi (fix(dashboard): read OpenCode model limits from the catalog).

O board único passou changelog, typecheck:core, complexity e cognitive. Os 5 testes de guide-settings que falham com HTTP 422 também falham no tip: o guard de escrita recusa o alvo fora de um mount quando `/.dockerenv` existe. Não é regressão deste PR.

O rebaseline de file-size dos arquivos que cresceram fica num follow-up, depois destes squashes.

⚠️ base-red inherited: cheaper-inference#15306

Obrigado, @HouMinXi.
…inference#15499)

Correções já validadas no board. Este squash entra com o crédito de @lorenzozanee (fix(executors): route GHE Copilot GPT-6 models to Responses).

O board único passou changelog, typecheck:core, complexity e cognitive. Os 5 testes de guide-settings que falham com HTTP 422 também falham no tip: o guard de escrita recusa o alvo fora de um mount quando `/.dockerenv` existe. Não é regressão deste PR.

O rebaseline de file-size dos arquivos que cresceram fica num follow-up, depois destes squashes.

⚠️ base-red inherited: cheaper-inference#15306

Obrigado, @lorenzozanee.
…lists (cheaper-inference#15602)

Correções já validadas no board. Este squash entra com o crédito de @Junior-HJ (fix(cursor): bridge native tool execs by schema shape, not just name lists).

O board único passou changelog, typecheck:core, complexity e cognitive. Os 5 testes de guide-settings que falham com HTTP 422 também falham no tip: o guard de escrita recusa o alvo fora de um mount quando `/.dockerenv` existe. Não é regressão deste PR.

O rebaseline de file-size dos arquivos que cresceram fica num follow-up, depois destes squashes.

⚠️ base-red inherited: cheaper-inference#15306

Obrigado, @Junior-HJ.
…odelsFromGithubCatalog (cheaper-inference#15525) (cheaper-inference#15578)

Correções já validadas no board. Este squash entra com o crédito de @alltomatos (fix(providers): append new models from GitHub catalog in enrichCodexModelsFromGitHub).

O board único passou changelog, typecheck:core, complexity e cognitive. Os 5 testes de guide-settings que falham com HTTP 422 também falham no tip: o guard de escrita recusa o alvo fora de um mount quando `/.dockerenv` existe. Não é regressão deste PR.

O rebaseline de file-size dos arquivos que cresceram fica num follow-up, depois destes squashes.

⚠️ base-red inherited: cheaper-inference#15306

Obrigado, @alltomatos.
…wn models as 429 (cheaper-inference#15024)

Correções já validadas no board. Este squash entra com o crédito de @mdc2122 (fix(cursor): live-discover cursor-api models and stop reporting unknown models as missing).

O board único passou changelog, typecheck:core, complexity e cognitive. Os 5 testes de guide-settings que falham com HTTP 422 também falham no tip: o guard de escrita recusa o alvo fora de um mount quando `/.dockerenv` existe. Não é regressão deste PR.

O rebaseline de file-size dos arquivos que cresceram fica num follow-up, depois destes squashes.

⚠️ base-red inherited: cheaper-inference#15306

Obrigado, @mdc2122.
…e#15696)

Follow-up das correções. Nenhum código de produto.

Tetos medidos no tip depois dos squashes:

- `src/app/api/providers/[id]/models/route.ts` 2432 → 2446 (cheaper-inference#15024)
- `tests/unit/combo-routing-engine.test.ts` 3625 → 3663 (cheaper-inference#15535)

File-size OK. i18n drift já estava PASS neste tip.

⚠️ base-red inherited: cheaper-inference#15306
…combos/auto (cheaper-inference#15353)

Onda 8. Este squash entra com o crédito de @maxmad64bis (fix(api): resolve auto-combo candidate capabilities once in GET /api/combos/auto).

O merge com o tip atual é limpo: cinco arquivos, sem superfície protegida. O rebaseline de file-size da onda, se houver, fica no follow-up depois dos PRs que ainda conflitam.

⚠️ base-red inherited: cheaper-inference#15306

Obrigado, @maxmad64bis.
… of blocking the whole provider (cheaper-inference#15469)

Onda 8. Este squash entra com o crédito de @maxmad64bis (feat(dashboard): token refresh failures can pause per account instead of blocking the whole provider).

O conflito com o tip foi resolvido no fork: o formato atual do `chatCore` dividido ficou, e as opções do breaker (scope, limiar, cooldown, connectionId) foram reaplicadas nos dois call sites de `refreshWithRetry`. O teto de file-size não entra neste squash; o follow-up mede depois da onda.

⚠️ base-red inherited: cheaper-inference#15306

Obrigado, @maxmad64bis.
…r-inference#15483)

Onda 8. Este squash entra com o crédito de @maxmad64bis (fix(noauth): show active free-tier pauses on the account card).

cheaper-inference#15402 e cheaper-inference#15443 já estavam neste branch e entram com ele. O comportamento que o cheaper-inference#15436 já publicou ficou o da release. O cartão de pausa e a rota de visibilidade são deste PR. O teto de file-size fica para o follow-up da onda.

⚠️ base-red inherited: cheaper-inference#15306

Obrigado, @maxmad64bis.
Migration 199. Drop 199 from KNOWN_GAPS because the file exists.
The operator-egress flag stays default off.
@diegosouzapw
diegosouzapw merged commit 4a7f7d2 into cheaper-inference:release/v3.8.52 Oct 6, 2026
1 of 3 checks passed
diegosouzapw added a commit that referenced this pull request Oct 6, 2026
Follow-up da onda 8. Nenhum código de produto.

Tetos medidos no tip depois dos squashes:

- `src/app/(dashboard)/dashboard/settings/components/ResilienceTab.tsx` 1271 → 1285 (#15469)
- `src/lib/proxySubscription/subscriptionService.ts` passou do cap 1200 e ficou congelado em 1212 (#15564)

i18n: só os hashes de `docs/reference/ENVIRONMENT.md` e `docs/reference/FEATURE_FLAGS.md` (#15314). O resto do estado não foi regravado.

File-size OK. i18n drift PASS neste commit.

⚠️ base-red inherited: #15306
@maxmad64bis
maxmad64bis deleted the feat/operator-egress-observations branch October 7, 2026 20:37
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.

feat(resilience): accept operator-provided dated egress observations for core entries