Skip to content

Commit 01c1c99

Browse files
feat(openai): add GPT-5.6 family (sol, terra, luna) support (Zoo-Code-Org#876)
* feat(openai): add GPT-5.6 family (sol, terra, luna) support Add the GPT-5.6 model family to both the OpenAI Codex (ChatGPT subscription) and OpenAI Native (API) providers: - gpt-5.6-sol: flagship frontier reasoning/coding model - gpt-5.6-terra: balanced everyday model - gpt-5.6-luna: fastest, most affordable family member Update the default model id for both providers to gpt-5.6-sol and update the corresponding unit test assertions. Closes Zoo-Code-Org#871 * fix(openai-codex): correct GPT-5.6 context windows to 372000 Address review feedback on PR Zoo-Code-Org#876: the GPT-5.6 model context windows in the Codex provider were set to 400000, but the OpenAI codex models.json shows context_window and max_context_window of 372000 for all three GPT-5.6 variants (sol, terra, luna). Updated accordingly.
1 parent 5751a16 commit 01c1c99

4 files changed

Lines changed: 126 additions & 4 deletions

File tree

‎packages/types/src/providers/openai-codex.ts‎

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,64 @@ import type { ModelInfo } from "../model.js"
1616

1717
export type OpenAiCodexModelId = keyof typeof openAiCodexModels
1818

19-
export const openAiCodexDefaultModelId: OpenAiCodexModelId = "gpt-5.3-codex"
19+
export const openAiCodexDefaultModelId: OpenAiCodexModelId = "gpt-5.6-sol"
2020

2121
/**
2222
* Models available through the Codex OAuth flow.
2323
* These models are accessible to ChatGPT Plus/Pro subscribers.
2424
* Costs are 0 as they are covered by the subscription.
2525
*/
2626
export const openAiCodexModels = {
27+
"gpt-5.6-sol": {
28+
maxTokens: 128000,
29+
contextWindow: 372000,
30+
includedTools: ["apply_patch"],
31+
excludedTools: ["apply_diff", "write_to_file"],
32+
supportsImages: true,
33+
supportsPromptCache: true,
34+
supportsReasoningEffort: ["none", "low", "medium", "high", "xhigh", "max"],
35+
reasoningEffort: "medium",
36+
// Subscription-based: no per-token costs
37+
inputPrice: 0,
38+
outputPrice: 0,
39+
supportsVerbosity: true,
40+
supportsTemperature: false,
41+
description:
42+
"GPT-5.6 Sol: OpenAI's flagship model for frontier reasoning, coding, and agentic workflows via ChatGPT subscription",
43+
},
44+
"gpt-5.6-terra": {
45+
maxTokens: 128000,
46+
contextWindow: 372000,
47+
includedTools: ["apply_patch"],
48+
excludedTools: ["apply_diff", "write_to_file"],
49+
supportsImages: true,
50+
supportsPromptCache: true,
51+
supportsReasoningEffort: ["none", "low", "medium", "high", "xhigh", "max"],
52+
reasoningEffort: "medium",
53+
// Subscription-based: no per-token costs
54+
inputPrice: 0,
55+
outputPrice: 0,
56+
supportsVerbosity: true,
57+
supportsTemperature: false,
58+
description:
59+
"GPT-5.6 Terra: Balanced everyday model with GPT-5.5-competitive performance via ChatGPT subscription",
60+
},
61+
"gpt-5.6-luna": {
62+
maxTokens: 128000,
63+
contextWindow: 372000,
64+
includedTools: ["apply_patch"],
65+
excludedTools: ["apply_diff", "write_to_file"],
66+
supportsImages: true,
67+
supportsPromptCache: true,
68+
supportsReasoningEffort: ["none", "low", "medium", "high", "xhigh", "max"],
69+
reasoningEffort: "medium",
70+
// Subscription-based: no per-token costs
71+
inputPrice: 0,
72+
outputPrice: 0,
73+
supportsVerbosity: true,
74+
supportsTemperature: false,
75+
description: "GPT-5.6 Luna: The fastest, most affordable member of the GPT-5.6 family via ChatGPT subscription",
76+
},
2777
"gpt-5.1-codex-max": {
2878
maxTokens: 128000,
2979
contextWindow: 400000,

‎packages/types/src/providers/openai.ts‎

Lines changed: 73 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,81 @@ import type { ModelInfo } from "../model.js"
33
// https://openai.com/api/pricing/
44
export type OpenAiNativeModelId = keyof typeof openAiNativeModels
55

6-
export const openAiNativeDefaultModelId: OpenAiNativeModelId = "gpt-5.1-codex-max"
6+
export const openAiNativeDefaultModelId: OpenAiNativeModelId = "gpt-5.6-sol"
77

88
export const openAiNativeModels = {
9+
"gpt-5.6-sol": {
10+
maxTokens: 128000,
11+
contextWindow: 1_050_000,
12+
includedTools: ["apply_patch"],
13+
excludedTools: ["apply_diff", "write_to_file"],
14+
supportsImages: true,
15+
supportsPromptCache: true,
16+
supportsReasoningEffort: ["none", "low", "medium", "high", "xhigh", "max"],
17+
reasoningEffort: "medium",
18+
inputPrice: 5.0,
19+
outputPrice: 30.0,
20+
cacheWritesPrice: 6.25,
21+
cacheReadsPrice: 0.5,
22+
longContextPricing: {
23+
thresholdTokens: 272_000,
24+
inputPriceMultiplier: 2,
25+
outputPriceMultiplier: 1.5,
26+
appliesToServiceTiers: ["default", "flex"],
27+
},
28+
supportsVerbosity: true,
29+
supportsTemperature: false,
30+
tiers: [
31+
{ name: "flex", contextWindow: 1_050_000, inputPrice: 2.5, outputPrice: 15.0, cacheReadsPrice: 0.25 },
32+
{ name: "priority", contextWindow: 1_050_000, inputPrice: 12.5, outputPrice: 75.0, cacheReadsPrice: 1.25 },
33+
],
34+
description: "GPT-5.6 Sol: OpenAI's flagship model for frontier reasoning, coding, and agentic workflows",
35+
},
36+
"gpt-5.6-terra": {
37+
maxTokens: 128000,
38+
contextWindow: 1_050_000,
39+
includedTools: ["apply_patch"],
40+
excludedTools: ["apply_diff", "write_to_file"],
41+
supportsImages: true,
42+
supportsPromptCache: true,
43+
supportsReasoningEffort: ["none", "low", "medium", "high", "xhigh", "max"],
44+
reasoningEffort: "medium",
45+
inputPrice: 2.5,
46+
outputPrice: 15.0,
47+
cacheWritesPrice: 3.125,
48+
cacheReadsPrice: 0.25,
49+
longContextPricing: {
50+
thresholdTokens: 272_000,
51+
inputPriceMultiplier: 2,
52+
outputPriceMultiplier: 1.5,
53+
appliesToServiceTiers: ["default", "flex"],
54+
},
55+
supportsVerbosity: true,
56+
supportsTemperature: false,
57+
tiers: [
58+
{ name: "flex", contextWindow: 1_050_000, inputPrice: 1.25, outputPrice: 7.5, cacheReadsPrice: 0.125 },
59+
{ name: "priority", contextWindow: 1_050_000, inputPrice: 6.25, outputPrice: 37.5, cacheReadsPrice: 0.625 },
60+
],
61+
description: "GPT-5.6 Terra: Balanced everyday model with GPT-5.5-competitive performance at 2x lower cost",
62+
},
63+
"gpt-5.6-luna": {
64+
maxTokens: 128000,
65+
contextWindow: 400000,
66+
includedTools: ["apply_patch"],
67+
excludedTools: ["apply_diff", "write_to_file"],
68+
supportsImages: true,
69+
supportsPromptCache: true,
70+
supportsReasoningEffort: ["none", "low", "medium", "high", "xhigh", "max"],
71+
reasoningEffort: "medium",
72+
inputPrice: 1.0,
73+
outputPrice: 6.0,
74+
cacheWritesPrice: 1.25,
75+
cacheReadsPrice: 0.1,
76+
supportsVerbosity: true,
77+
supportsTemperature: false,
78+
tiers: [{ name: "flex", contextWindow: 400000, inputPrice: 0.5, outputPrice: 3.0, cacheReadsPrice: 0.05 }],
79+
description: "GPT-5.6 Luna: The fastest, most affordable member of the GPT-5.6 family",
80+
},
981
"gpt-5.1-codex-max": {
1082
maxTokens: 128000,
1183
contextWindow: 400000,

‎src/api/providers/__tests__/openai-codex.spec.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ describe("OpenAiCodexHandler.getModel", () => {
2222
const handler = new OpenAiCodexHandler({ apiModelId: "not-a-real-model" })
2323
const model = handler.getModel()
2424

25-
expect(model.id).toBe("gpt-5.3-codex")
25+
expect(model.id).toBe("gpt-5.6-sol")
2626
expect(model.info).toBeDefined()
2727
})
2828

‎src/api/providers/__tests__/openai-native.spec.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ describe("OpenAiNativeHandler", () => {
356356
openAiNativeApiKey: "test-api-key",
357357
})
358358
const modelInfo = handlerWithoutModel.getModel()
359-
expect(modelInfo.id).toBe("gpt-5.1-codex-max") // Default model
359+
expect(modelInfo.id).toBe("gpt-5.6-sol") // Default model
360360
expect(modelInfo.info).toBeDefined()
361361
})
362362
})

0 commit comments

Comments
 (0)