Compare commits

...

1 Commits

Author SHA1 Message Date
adevwithpurpose
8512dd47f0 fix(combo): actionable recovery hint for the all_targets_skipped terminal reason (#9303) 2026-08-15 19:37:09 -03:00
3 changed files with 38 additions and 0 deletions

View File

@@ -0,0 +1 @@
- fix(combo): recovery hint for all_targets_skipped now points at provider quota/availability instead of 'transient, just retry' (#9303)

View File

@@ -53,6 +53,12 @@ export function buildRecoveryHint(
next_step:
"Strict context requirements removed every target (known context windows are below minContextWindow). Lower minContextWindow, switch contextFilterMode to lenient, or add larger-context models.",
};
case "all_targets_skipped":
return {
action: "switch-combo",
next_step:
"Every target was skipped before dispatch (capability pre-filter narrowed the pool and the remaining targets were all quota-exhausted/unavailable). Check the provider's quota in /dashboard/providers, reconnect or top up the account, or switch to a combo/model that has a healthy capability-matching target.",
};
default:
return {
action: "retry",

View File

@@ -0,0 +1,31 @@
import test from "node:test";
import assert from "node:assert/strict";
const { buildRecoveryHint } = await import("../../open-sse/services/combo/pinRecovery.ts");
test(
"#9303: buildRecoveryHint('all_targets_skipped') must return an actionable " +
"hint, not the generic 'transient, just retry' default",
() => {
const hint = buildRecoveryHint("all_targets_skipped");
assert.notEqual(
hint.action,
"retry",
"the pre-dispatch full-exhaustion terminal reason must not be classified as a " +
"generically 'retry'-able transient failure — the reporter's log shows the " +
"identical exhaustion recurring across ~9 consecutive requests with no recovery"
);
assert.doesNotMatch(
hint.next_step,
/failed transiently/i,
"must not tell the client this was transient when the whole target pool was " +
"pre-filtered/quota-exhausted before a single dispatch attempt was made"
);
assert.match(
hint.next_step,
/quota|availability|provider/s,
"the hint must point at the provider quota/availability as the actionable next step"
);
}
);