Repository navigation
fix(providers): route terminal testStatus writes through a single origin-aware passage - #11009
Merged
diegosouzapw merged 1 commit intoAug 21, 2026
Conversation
…gin-aware passage
maxmad64bis
force-pushed
the
fix/terminal-status-origin
branch
from
August 21, 2026 15:10
5f706fd to
d38f07d
Compare
diegosouzapw
merged commit Aug 21, 2026
8d07632
into
cheaper-inference:release/v3.8.50
7 of 16 checks passed
Sa3id23
pushed a commit
to Sa3id23/OmniRoute
that referenced
this pull request
Aug 21, 2026
…gin-aware passage (cheaper-inference#11009) ⭐5 — Health-check failures compartilhavam o mesmo caminho de escrita de terminalStatus que requests reais, banindo conexão por health-check falho (403) por um ano. Novo helper origin-aware centraliza toda escrita terminal; health-check só loga, request real desativa como antes. TDD, 6/6 testes, lint/typecheck/cycles OK.
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…gin-aware passage (cheaper-inference#11009) ⭐5 — Health-check failures compartilhavam o mesmo caminho de escrita de terminalStatus que requests reais, banindo conexão por health-check falho (403) por um ano. Novo helper origin-aware centraliza toda escrita terminal; health-check só loga, request real desativa como antes. TDD, 6/6 testes, lint/typecheck/cycles OK.
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
Health checks and real requests share the same code path. A health check that gets a 403 currently bans the connection for a year — same as a real user being blocked. No user was blocked, but the connection is removed from the pool until an operator re-enables it.
#10694 already fixed this for most cases. This PR makes the rule explicit: one helper, every terminal write goes through it. Health-check failures are logged but never disable the connection; real requests are unchanged.
Related Issues
Related to #11006
Changes
src/shared/utils/terminalStatus.ts— single helper that writes terminal states: health-check origin only records the error, real-request origin disables as before; double-gated (explicit origin + check) so queued health checks are still isolatedopen-sse/handlers/chatCore.ts— banned, deactivated, and quota-exhausted sites now go through the helper (duplicated probe guards removed, log kept); temporary states and per-model locks stay outsidetests/unit/terminal-status-origin.test.ts— health-check leaves the connection active, real request disables itOut of scope for this PR: health-check sweep and account-unavailable paths are already outside health-check context or correctly guarded — expanding the helper there is a follow-up.
Testing
node --import tsx/esm --test tests/unit/terminal-status-origin.test.ts tests/unit/probe-testall-isolation.test.ts— 6/6npm run lint/typecheck:core/check:cycles— 0 / 0 / OKChecklist
c130f2aa1)release/v3.8.50turns green)Reviewer Notes