Models: mark GPT-5.4 as modern and xhigh

This commit is contained in:
Vincent Koc 2026-03-05 23:36:15 -05:00
parent 0e4245063f
commit 22043197ba
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,13 @@
import { describe, expect, it } from "vitest";
import { isModernModelRef } from "./live-model-filter.js";
describe("isModernModelRef", () => {
it("accepts new openai gpt-5.4 refs", () => {
expect(isModernModelRef({ provider: "openai", id: "gpt-5.4" })).toBe(true);
expect(isModernModelRef({ provider: "openai", id: "gpt-5.4-pro" })).toBe(true);
});
it("keeps rejecting older openai refs outside the allowlist", () => {
expect(isModernModelRef({ provider: "openai", id: "gpt-4.1" })).toBe(false);
});
});

View File

@ -42,6 +42,11 @@ describe("normalizeThinkLevel", () => {
});
describe("listThinkingLevels", () => {
it("includes xhigh for openai gpt-5.4 refs", () => {
expect(listThinkingLevels("openai", "gpt-5.4")).toContain("xhigh");
expect(listThinkingLevels("openai", "gpt-5.4-pro")).toContain("xhigh");
});
it("includes xhigh for codex models", () => {
expect(listThinkingLevels(undefined, "gpt-5.2-codex")).toContain("xhigh");
expect(listThinkingLevels(undefined, "gpt-5.3-codex")).toContain("xhigh");