Skip to content
This repository was archived by the owner on Aug 6, 2026. It is now read-only.

Commit 802497e

Browse files
authored
fix(models): offer max reasoning for gpt-5.6 (#3376)
1 parent adc36d2 commit 802497e

3 files changed

Lines changed: 23 additions & 7 deletions

File tree

‎packages/agent/src/adapters/codex-app-server/models.test.ts‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
formatCodexModelName,
55
getReasoningEffortOptions,
66
modelIdFromConfigOptions,
7+
supportsMaxEffort,
78
supportsXhighEffort,
89
} from "./models";
910

@@ -30,8 +31,8 @@ describe("getReasoningEffortOptions", () => {
3031
"gpt-5.6-luna",
3132
"openai/gpt-5.6-sol",
3233
"GPT-5.6-SOL",
33-
])("offers Extra High for the gpt-5.6 family (%s)", (modelId) => {
34-
expect(values(modelId)).toEqual(["low", "medium", "high", "xhigh"]);
34+
])("offers Max for the gpt-5.6 family (%s)", (modelId) => {
35+
expect(values(modelId)).toEqual(["low", "medium", "high", "xhigh", "max"]);
3536
});
3637

3738
it.each(["gpt-5.3-codex", "gpt-5.1", "o3"])(
@@ -57,6 +58,14 @@ describe("supportsXhighEffort", () => {
5758
});
5859
});
5960

61+
describe("supportsMaxEffort", () => {
62+
it("is true only for the gpt-5.6 family", () => {
63+
expect(supportsMaxEffort("gpt-5.6-sol")).toBe(true);
64+
expect(supportsMaxEffort("GPT-5.6-LUNA")).toBe(true);
65+
expect(supportsMaxEffort("gpt-5.5")).toBe(false);
66+
});
67+
});
68+
6069
describe("modelIdFromConfigOptions", () => {
6170
const modelOption = (currentValue: unknown): SessionConfigOption =>
6271
({

‎packages/agent/src/adapters/codex-app-server/models.ts‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,28 @@ const CODEX_REASONING_EFFORT_OPTIONS: ReasoningEffortOption[] = [
1515
{ value: "high", name: "High" },
1616
];
1717

18-
// OpenAI's `reasoning_effort` exposes an "extra high" tier only on the gpt-5.5
19-
// and gpt-5.6 families, matching what the Codex app offers. Older models top
20-
// out at "high".
18+
// OpenAI's `reasoning_effort` exposes an "extra high" tier on the gpt-5.5 and
19+
// gpt-5.6 families. GPT-5.6 also supports the "max" tier. Older models top out
20+
// at "high".
2121
export function supportsXhighEffort(modelId: string): boolean {
2222
const id = modelId.toLowerCase();
2323
return id.includes("gpt-5.5") || id.includes("gpt-5.6");
2424
}
2525

26+
export function supportsMaxEffort(modelId: string): boolean {
27+
return modelId.toLowerCase().includes("gpt-5.6");
28+
}
29+
2630
export function getReasoningEffortOptions(
2731
modelId: string,
2832
): ReasoningEffortOption[] {
2933
const options = [...CODEX_REASONING_EFFORT_OPTIONS];
3034
if (supportsXhighEffort(modelId)) {
3135
options.push({ value: "xhigh", name: "Extra High" });
3236
}
37+
if (supportsMaxEffort(modelId)) {
38+
options.push({ value: "max", name: "Max" });
39+
}
3340
return options;
3441
}
3542

‎packages/agent/src/adapters/reasoning-effort.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ describe("isSupportedReasoningEffort", () => {
1515
);
1616
});
1717

18-
it("accepts xhigh but not max for the codex gpt-5.6 family", () => {
18+
it("accepts xhigh and max for the codex gpt-5.6 family", () => {
1919
expect(isSupportedReasoningEffort("codex", "gpt-5.6-luna", "xhigh")).toBe(
2020
true,
2121
);
2222
expect(isSupportedReasoningEffort("codex", "gpt-5.6-sol", "max")).toBe(
23-
false,
23+
true,
2424
);
2525
});
2626

0 commit comments

Comments
 (0)