mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-25 08:32:11 +03:00
fix(sse): preserve auto-selected first target (#11399)
Validado em lote combinado (batch-0824f, junto de #11400/#11402/#11407) contra o tip de release/v3.8.50: typecheck:core limpo, file-size/changelog/complexity/cognitive-complexity OK (abaixo do baseline), 56/56 testes focados passando incluindo os deste PR (tests/unit/8370-priority-affinity-reorder.test.ts). Aditivo e coerente: protege a ordem já decidida pelo `auto` contra reordenação pelo pós-processamento de prompt-cache-affinity — mesma linha do #11400. Obrigado pela contribuição!
This commit is contained in:
@@ -290,6 +290,7 @@ export function shouldProtectOriginalFirst(
|
||||
return (
|
||||
stickyStuck ||
|
||||
autoUsedExplicitRouter ||
|
||||
strategy === "auto" ||
|
||||
strategy === "quota-share" ||
|
||||
strategy === "weighted" ||
|
||||
strategy === "priority" ||
|
||||
|
||||
@@ -139,8 +139,8 @@ test("BUG #8370: priority combo keeps its declared model-1-first order despite c
|
||||
);
|
||||
});
|
||||
|
||||
test("shouldProtectOriginalFirst covers priority, fill-first, and lkgp", () => {
|
||||
for (const strategy of ["priority", "fill-first", "lkgp"]) {
|
||||
test("shouldProtectOriginalFirst covers auto, priority, fill-first, and lkgp", () => {
|
||||
for (const strategy of ["auto", "priority", "fill-first", "lkgp"]) {
|
||||
assert.equal(
|
||||
shouldProtectOriginalFirst(false, false, strategy),
|
||||
true,
|
||||
|
||||
Reference in New Issue
Block a user