feat(codex): support GPT-5.6 Max and Ultra overrides

Add "ultra" reasoning level for Codex GPT-5.6 Sol and Terra, and expose
Max for Luna (Luna falls back Ultra to Max since it is not supported
upstream). Scoped to cx/ routes only; Kiro and generic OpenAI routing
unchanged.
This commit is contained in:
seakleang.nhak
2026-08-05 11:39:07 +07:00
parent 651df2f0e2
commit 86131b9ca4
10 changed files with 675 additions and 19 deletions

View File

@@ -2,11 +2,21 @@ import { describe, it, expect } from "vitest";
import { getThinkingLevels } from "../../open-sse/providers/thinkingLevels.js";
describe("getThinkingLevels", () => {
it("adds max for gpt-5.6-sol on codex", () => {
const levels = getThinkingLevels("codex", "gpt-5.6-sol");
expect(levels).toContain("max");
expect(levels).toContain("xhigh");
expect(levels).not.toContain("ultra");
it.each([
["gpt-5.6-sol", ["none", "minimal", "low", "medium", "high", "xhigh", "max", "ultra"]],
["gpt-5.6-terra", ["none", "minimal", "low", "medium", "high", "xhigh", "max", "ultra"]],
["gpt-5.6-luna", ["none", "minimal", "low", "medium", "high", "xhigh", "max"]],
["gpt-5.6-sol-review", ["none", "minimal", "low", "medium", "high", "xhigh", "max", "ultra"]],
["gpt-5.6-terra-review", ["none", "minimal", "low", "medium", "high", "xhigh", "max", "ultra"]],
["gpt-5.6-luna-review", ["none", "minimal", "low", "medium", "high", "xhigh", "max"]],
])("returns Codex levels for %s", (model, expected) => {
expect(getThinkingLevels("codex", model)).toEqual(expected);
});
it("does not expose Codex-only GPT-5.6 overrides on Kiro", () => {
expect(getThinkingLevels("kiro", "gpt-5.6-sol")).toEqual([
"none", "minimal", "low", "medium", "high", "xhigh",
]);
});
it("does not add max for other codex models", () => {
@@ -14,7 +24,7 @@ describe("getThinkingLevels", () => {
expect(levels).toEqual(["low", "medium", "high", "xhigh"]);
});
it("does not add max for other gpt-5.6 models", () => {
it("does not add max for other Codex models", () => {
const levels = getThinkingLevels("codex", "gpt-5.5");
expect(levels || []).not.toContain("max");
});