fix(provider): expose GPT-5.6 max reasoning

This commit is contained in:
Victor Navarro
2026-07-11 09:37:11 +00:00
parent 9976269ab1
commit 54da8cd1d3
2 changed files with 9 additions and 1 deletions
+3 -1
View File
@@ -520,6 +520,7 @@ const WIDELY_SUPPORTED_EFFORTS = ["low", "medium", "high"]
const OPENAI_EFFORTS = ["none", "minimal", ...WIDELY_SUPPORTED_EFFORTS, "xhigh"]
const OPENAI_GPT5_1_EFFORTS = ["none", ...WIDELY_SUPPORTED_EFFORTS]
const OPENAI_GPT5_2_PLUS_EFFORTS = [...OPENAI_GPT5_1_EFFORTS, "xhigh"]
const OPENAI_GPT5_6_PLUS_EFFORTS = [...OPENAI_GPT5_2_PLUS_EFFORTS, "max"]
const OPENAI_GPT5_PRO_EFFORTS = ["high"]
const OPENAI_GPT5_PRO_2_PLUS_EFFORTS = ["medium", "high", "xhigh"]
const OPENAI_GPT5_CHAT_EFFORTS = ["medium"]
@@ -551,6 +552,7 @@ function versionedGpt5ReasoningEfforts(apiId: string) {
const version = gpt5Version(apiId)
if (version === undefined) return undefined
if (version === 1) return OPENAI_GPT5_1_EFFORTS
if (version >= 6) return OPENAI_GPT5_6_PLUS_EFFORTS
return OPENAI_GPT5_2_PLUS_EFFORTS
}
@@ -580,7 +582,7 @@ function openaiReasoningEfforts(apiId: string, releaseDate: string) {
if (codexEfforts) return codexEfforts
const versionedEfforts = versionedGpt5ReasoningEfforts(id)
// GPT-5.1 replaced GPT-5's `minimal` effort with `none`; GPT-5.2+
// additionally accepts `xhigh`. Model pages list the supported subset.
// additionally accepts `xhigh`, and GPT-5.6+ accepts `max`.
if (versionedEfforts) return versionedEfforts
const efforts = [...WIDELY_SUPPORTED_EFFORTS]
if (GPT5_FAMILY_RE.test(id)) efforts.unshift("minimal")
@@ -3301,6 +3301,7 @@ describe("ProviderTransform.variants", () => {
for (const testCase of [
{ id: "openai/o3-mini", efforts: ["none", "minimal", "low", "medium", "high", "xhigh"] },
{ id: "openai/gpt-5.4", efforts: ["none", "low", "medium", "high", "xhigh"] },
{ id: "openai/gpt-5.6-sol", efforts: ["none", "low", "medium", "high", "xhigh", "max"] },
{ id: "openai/gpt-5-pro", efforts: ["high"] },
{ id: "openai/gpt-5.5-pro", efforts: ["medium", "high", "xhigh"] },
{ id: "openai/gpt-5.2-codex", efforts: ["low", "medium", "high", "xhigh"] },
@@ -4005,6 +4006,11 @@ describe("ProviderTransform.variants", () => {
releaseDate: "2026-04-23",
efforts: ["none", "low", "medium", "high", "xhigh"],
},
{
id: "gpt-5.6-sol",
releaseDate: "2026-07-09",
efforts: ["none", "low", "medium", "high", "xhigh", "max"],
},
{ id: "gpt-5.4-pro", releaseDate: "2026-03-05", efforts: ["medium", "high", "xhigh"] },
{ id: "gpt-5.5-pro", releaseDate: "2026-04-23", efforts: ["medium", "high", "xhigh"] },
{ id: "gpt-5-codex", releaseDate: "2025-09-23", efforts: ["low", "medium", "high"] },