mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-09-19 13:23:50 +03:00
fix(combo): fall through on pinned 401 responses (#12818)
* fix(combo): fall through on pinned 401 responses * test(combo): cover pinned 401 in existing fallback regression --------- Co-authored-by: Hermes Freebrain <freebrain@localhost>
This commit is contained in:
1
changelog.d/fixes/0000-pinned-401-combo-fallback.md
Normal file
1
changelog.d/fixes/0000-pinned-401-combo-fallback.md
Normal file
@@ -0,0 +1 @@
|
||||
- **Combo routing:** a context-cache-pinned model that returns `401` now falls through to the normal combo fallback loop instead of terminating the request, allowing other eligible connections or providers to serve it.
|
||||
@@ -247,7 +247,7 @@ async function evaluatePinnedResponse(args: {
|
||||
return null;
|
||||
}
|
||||
const pinnedStatus = pinnedResult.status || 500;
|
||||
if (![408, 429, 500, 502, 503, 504].includes(pinnedStatus)) {
|
||||
if (![401, 408, 429, 500, 502, 503, 504].includes(pinnedStatus)) {
|
||||
return pinnedResult;
|
||||
}
|
||||
log.warn(
|
||||
|
||||
@@ -491,7 +491,7 @@ test("tryPinnedModelDispatch: expands the combo system_message template on the p
|
||||
});
|
||||
|
||||
test("tryPinnedModelDispatch: fails over when the pinned model returns a transient status", async () => {
|
||||
for (const status of [408, 429, 500, 502, 503, 504]) {
|
||||
for (const status of [401, 408, 429, 500, 502, 503, 504]) {
|
||||
const ctx = pinCtx();
|
||||
const { res } = await dispatchHealthyPin(
|
||||
ctx,
|
||||
|
||||
Reference in New Issue
Block a user