fix(test): skip models.dev existence check for fallback aliases

deprecated aliases (`fallback` set) legitimately point at dead resolve
targets — xAI just retired grok-4-1-fast/grok-code-fast-1 and #761 wired
them through the fallback chain. the terminal-fallback is validated
separately by the Zen served-list test.
This commit is contained in:
Colin McDonnell
2026-05-16 05:14:51 +00:00
committed by pullfrog[bot]
parent 0a64659ee7
commit efc1b67e7b
+11 -7
View File
@@ -47,6 +47,12 @@ describe("models.dev validity", async () => {
// since there's no models.dev entry to validate against.
if (alias.routing) continue;
// aliases with a `fallback` are deprecated entries that legitimately point
// at dead resolve targets — the fallback chain redirects callers to a live
// model. skip both existence and deprecation checks; the terminal-fallback
// is validated separately by the Zen served-list test below.
if (alias.fallback) continue;
const parsed = parseResolve(alias.resolve);
it(`${alias.resolve} exists on models.dev`, () => {
@@ -59,13 +65,11 @@ describe("models.dev validity", async () => {
).toBeDefined();
});
if (!alias.fallback) {
it(`${alias.resolve} is not deprecated`, () => {
const model = data[parsed.provider]?.models[parsed.modelId];
if (!model) return; // covered by existence test above
expect(model.status, `${alias.resolve} is deprecated on models.dev`).not.toBe("deprecated");
});
}
it(`${alias.resolve} is not deprecated`, () => {
const model = data[parsed.provider]?.models[parsed.modelId];
if (!model) return; // covered by existence test above
expect(model.status, `${alias.resolve} is deprecated on models.dev`).not.toBe("deprecated");
});
}
});