Repository navigation
fix(models): don't auto-hide rate-limited/timeout models on Test All #3849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
dc1e22f
622373e
75adf6b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,16 +33,21 @@ test("failed entry maps to status 'error' and hides only when autoHide is on", ( | |
| }); | ||
| }); | ||
|
|
||
| test("rate-limited / timeout failures show 'error' and ARE auto-hidden (hide every failure)", () => { | ||
| test("rate-limited / timeout failures show 'error' but are NOT auto-hidden", () => { | ||
| // Rate-limited and timeout are TRANSIENT — the model itself is fine, the | ||
| // provider was just throttled during a parallel Test All. Hiding it would | ||
| // silently remove a working model from /v1/models with no recovery path | ||
| // short of manual DB edit or per-row eye-toggle. We surface the failure on | ||
| // the row icon (status: 'error') but keep the model visible. | ||
| assert.deepEqual(evaluateTestAllEntry({ status: "error", rateLimited: true }, true), { | ||
| status: "error", | ||
| shouldHide: true, | ||
| shouldHide: false, | ||
| }); | ||
| assert.deepEqual(evaluateTestAllEntry({ status: "error", isTimeout: true }, true), { | ||
| status: "error", | ||
| shouldHide: true, | ||
| shouldHide: false, | ||
| }); | ||
| // ...but only when the toggle is on | ||
| // Toggle off → still not hidden, of course. | ||
| assert.deepEqual(evaluateTestAllEntry({ status: "error", rateLimited: true }, false), { | ||
| status: "error", | ||
| shouldHide: false, | ||
|
Comment on lines
51
to
53
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update Test for Missing/Null/Empty EntriesSince we should only auto-hide models with an explicit Currently, that test is outside the modified diff hunk, so we cannot provide a direct code suggestion for it, but please update it manually to: test("missing / null / empty entry is treated as a failure but NOT hidden", () => {
for (const entry of [undefined, null, {}]) {
const out = evaluateTestAllEntry(entry, true);
assert.equal(out.status, "error", `entry=${JSON.stringify(entry)} → error`);
assert.equal(out.shouldHide, false);
}
}); |
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Critical Bug: Skipped or Untested Models are Silently Auto-Hidden
When a batch test is run, there are two scenarios where a model's test entry (
entry) can beundefinedornull:src/app/api/models/test-all/route.tsstops early if it encounters consecutive rate limits (CONSECUTIVE_RATE_LIMIT_STOP_THRESHOLD). Any remaining models in the list are skipped and will not have an entry in the response./api/models/test-allrequest returns a non-200 response (e.g., a 500 error or validation error) but succeeds at the HTTP/JSON level,result.resultswill beundefined, meaningentryisundefinedfor all models.Under the current implementation, if
entryisundefinedornull,okis evaluated asfalse, andtransientisfalse. IfautoHideFailedis enabled,shouldHideevaluates totrue. This causes the client to silently auto-hide all skipped or untested models, permanently removing them from the catalog and/v1/models!To prevent this, we should only auto-hide a model if we have an explicit, confirmed failure status (
status: "error") from the test runner.