mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 12:11:24 +00:00
test: consolidate redundant suites and speed up timers
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import type { Api, Model } from "@mariozechner/pi-ai";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { isModernModelRef } from "./live-model-filter.js";
|
||||
import { normalizeModelCompat } from "./model-compat.js";
|
||||
|
||||
const baseModel = (): Model<Api> =>
|
||||
@@ -46,3 +47,15 @@ describe("normalizeModelCompat", () => {
|
||||
).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe("isModernModelRef", () => {
|
||||
it("excludes opencode minimax variants from modern selection", () => {
|
||||
expect(isModernModelRef({ provider: "opencode", id: "minimax-m2.1" })).toBe(false);
|
||||
expect(isModernModelRef({ provider: "opencode", id: "minimax-m2.5" })).toBe(false);
|
||||
});
|
||||
|
||||
it("keeps non-minimax opencode modern models", () => {
|
||||
expect(isModernModelRef({ provider: "opencode", id: "claude-opus-4-6" })).toBe(true);
|
||||
expect(isModernModelRef({ provider: "opencode", id: "gemini-3-pro" })).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user