mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-11 01:32:22 +03:00
fix(sse): update stale ALL_ACCOUNTS_INACTIVE test assertions to ALL_TARGETS_SKIPPED
Two combo-routing-engine.test.ts cases assert the pre-dispatch-skip scenario (isModelAvailable always false, zero dispatch attempts) returns ALL_ACCOUNTS_INACTIVE. Production code already distinguishes this case via the recordedAttempts === 0 branch and returns the more precise ALL_TARGETS_SKIPPED -- the tests were never updated when that branch shipped upstream, so they fail on a clean release/v3.8.50 checkout independent of this PR's changes.
This commit is contained in:
@@ -2318,7 +2318,11 @@ test("handleComboChat returns a 503 when every model is unavailable before execu
|
||||
|
||||
const payload = (await result.json()) as any;
|
||||
assert.equal(result.status, 503);
|
||||
assert.equal(payload.error.code, "ALL_ACCOUNTS_INACTIVE");
|
||||
// isModelAvailable always false means every target is skipped by the
|
||||
// pre-dispatch filter with zero dispatch attempts — the more precise
|
||||
// ALL_TARGETS_SKIPPED classification, not ALL_ACCOUNTS_INACTIVE (which
|
||||
// implies targets were attempted and their accounts found inactive).
|
||||
assert.equal(payload.error.code, "ALL_TARGETS_SKIPPED");
|
||||
});
|
||||
|
||||
test("handleComboChat treats provider circuit breaker responses as ordinary target failures", async () => {
|
||||
@@ -2847,7 +2851,10 @@ test("handleComboChat round-robin resolves nested combos and returns inactive wh
|
||||
|
||||
const payload = (await result.json()) as any;
|
||||
assert.equal(result.status, 503);
|
||||
assert.equal(payload.error.code, "ALL_ACCOUNTS_INACTIVE");
|
||||
// isModelAvailable always false means every nested target is skipped by the
|
||||
// pre-dispatch filter with zero dispatch attempts — ALL_TARGETS_SKIPPED,
|
||||
// not ALL_ACCOUNTS_INACTIVE (see the analogous priority-strategy test above).
|
||||
assert.equal(payload.error.code, "ALL_TARGETS_SKIPPED");
|
||||
});
|
||||
|
||||
test("handleComboChat round-robin treats provider circuit breaker responses as ordinary target failures", async () => {
|
||||
|
||||
Reference in New Issue
Block a user