Skip to content

fix(combo): keep the caller's connection pin through the safety-net redirect - #15280

Merged
diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.52from
HouMinXi:fix/combo-forced-connection
Oct 2, 2026
Merged

diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.52from
HouMinXi:fix/combo-forced-connection

Conversation

@HouMinXi

@HouMinXi HouMinXi commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

What

handleSingleModelChat forwards a request whose model names a combo into handleComboChat. The options object it rebuilt for that call hardcoded forcedConnectionId: null.

A caller that sends x-omniroute-connection: <id> therefore lost the pin as soon as the model resolved to a combo. Account selection fell through to the pool strategy. On a quota-weighted pool every pinned request landed on the single highest-quota connection.

The redirect now forwards runtimeOptions.forcedConnectionId. The emergency fallback path still clears the pin, and a test locks that split.

How to verify

node --test tests/unit/chat-safetynet-pin.test.ts

Reverting the one changed line in src/sse/handlers/chat.ts turns the redirect assertion red. Restoring it turns it green. The emergency-fallback assertion stays green either way.

@HouMinXi
HouMinXi requested a review from diegosouzapw as a code owner October 1, 2026 13:32
…edirect

handleSingleModelChat forwards a named combo into handleComboChat.
The options it rebuilt hardcoded forcedConnectionId to null, so a
pin from x-omniroute-connection never reached account selection and
a quota-weighted pool served one connection for every pin. Forward
the caller's pin. The emergency fallback still clears it.

The guard bounds each block with a marker that appears once, then
reads every forcedConnectionId assignment inside it.

Signed-off-by: Minxi Hou <houminxi@gmail.com>
@HouMinXi
HouMinXi force-pushed the fix/combo-forced-connection branch from fc10898 to d5ee814 Compare October 1, 2026 14:01
@diegosouzapw
diegosouzapw merged commit ba8e944 into diegosouzapw:release/v3.8.52 Oct 2, 2026
15 of 16 checks passed
@diegosouzapw

Copy link
Copy Markdown
Owner

Thanks @HouMinXi — merged into release/v3.8.52; it ships in the next release.

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.

2 participants