From 22043197ba9ef4647d73377cb1fd905de58de54d Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Thu, 5 Mar 2026 23:36:15 -0500 Subject: [PATCH] Models: mark GPT-5.4 as modern and xhigh --- src/agents/live-model-filter.test.ts | 13 +++++++++++++ src/auto-reply/thinking.test.ts | 5 +++++ 2 files changed, 18 insertions(+) create mode 100644 src/agents/live-model-filter.test.ts diff --git a/src/agents/live-model-filter.test.ts b/src/agents/live-model-filter.test.ts new file mode 100644 index 00000000000..eca20caca7a --- /dev/null +++ b/src/agents/live-model-filter.test.ts @@ -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); + }); +}); diff --git a/src/auto-reply/thinking.test.ts b/src/auto-reply/thinking.test.ts index 359082c2616..ef7da2df8f0 100644 --- a/src/auto-reply/thinking.test.ts +++ b/src/auto-reply/thinking.test.ts @@ -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");