Files
OmniRoute/tests/unit/bare-model-autopick.test.ts
Andrew B. 53f435da8d fix(antigravity): scope 404 model-not-found lockout to exact model + bare-model autopick (#8050)
Scopes the Antigravity 404 model-not-found lockout to the exact model (not the whole
family) so one missing bare model no longer hijacks the family cooldown, plus bare-model
autopick via resolveModelByProviderInference dedup. The thinking-signature-recovery portion
was dropped — #7899 is already fixed and merged on the release via #7906.

Co-authored-by: AndrianBalanescu <AndrianBalanescu@users.noreply.github.com>
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
2026-07-22 20:25:37 -03:00

22 lines
963 B
TypeScript

import test from "node:test";
import assert from "node:assert/strict";
import { getModelInfoCore } from "../../open-sse/services/model.ts";
test("gpt-oss-120b-medium auto-picks antigravity provider via canonical deduplication", async () => {
const info = await getModelInfoCore("gpt-oss-120b-medium", null);
assert.equal(info.provider, "antigravity");
assert.equal(info.model, "gpt-oss-120b-medium");
assert.equal((info as Record<string, unknown>).errorType, undefined);
});
test("unprefixed model with no active providers falls back to ambiguous_model when multiple distinct providers exist", async () => {
const info = await getModelInfoCore("gpt-oss-120b", null);
assert.equal(info.provider, null);
assert.equal((info as Record<string, unknown>).errorType, "ambiguous_model");
assert.ok(Array.isArray((info as Record<string, unknown>).candidateProviders));
assert.ok((info as Record<string, unknown>).candidateProviders.length > 1);
});