Skip to content

Commit f424bbb

Browse files
zoomote[bot]taltasnavedmerchant
authored
[Feat] Add verified GPT-6 Astra support across providers (#1506)
* feat(api): add verified GPT-6 Astra support * test(api): cover Astra request guards * feat(api): add GPT-6 Astra to Codex * feat(api): support Astra on verified gateways --------- Co-authored-by: @taltas <6816042+taltas@users.noreply.github.com> Co-authored-by: Naved Merchant <naved.merchant@gmail.com> Co-authored-by: @navedmerchant <14171946+navedmerchant@users.noreply.github.com>
1 parent 0d937c0 commit f424bbb

26 files changed

Lines changed: 993 additions & 110 deletions
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
import { openAiNativeDefaultModelId, openAiNativeModels } from "../providers/openai.js"
2+
3+
describe("OpenAI native models", () => {
4+
it("describes GPT-6 Astra without changing the provider default", () => {
5+
expect(openAiNativeDefaultModelId).toBe("gpt-5.6-sol")
6+
expect(openAiNativeModels["gpt-6-astra"]).toMatchObject({
7+
maxTokens: 128_000,
8+
contextWindow: 1_050_000,
9+
supportsImages: true,
10+
supportsPromptCache: true,
11+
supportsReasoningEffort: ["low", "medium", "high", "xhigh", "max"],
12+
requiredReasoningEffort: true,
13+
reasoningEffort: "medium",
14+
supportsTemperature: false,
15+
inputPrice: 10,
16+
cacheWritesPrice: 12.5,
17+
cacheReadsPrice: 1,
18+
outputPrice: 50,
19+
longContextPricing: {
20+
thresholdTokens: 272_000,
21+
inputPriceMultiplier: 2,
22+
outputPriceMultiplier: 1.5,
23+
cacheWritesPriceMultiplier: 2,
24+
cacheReadsPriceMultiplier: 2,
25+
appliesToServiceTiers: ["default", "flex", "priority"],
26+
},
27+
})
28+
29+
expect(openAiNativeModels["gpt-6-astra"].tiers).toEqual([
30+
{
31+
name: "flex",
32+
contextWindow: 1_050_000,
33+
inputPrice: 5,
34+
outputPrice: 25,
35+
cacheWritesPrice: 6.25,
36+
cacheReadsPrice: 0.5,
37+
},
38+
{
39+
name: "priority",
40+
contextWindow: 1_050_000,
41+
inputPrice: 20,
42+
outputPrice: 100,
43+
cacheWritesPrice: 25,
44+
cacheReadsPrice: 2,
45+
},
46+
])
47+
})
48+
49+
it("uses current GPT-5.6 base pricing and context metadata", () => {
50+
expect(openAiNativeModels["gpt-5.6-sol"]).toMatchObject({
51+
contextWindow: 1_050_000,
52+
inputPrice: 4,
53+
cacheWritesPrice: 5,
54+
cacheReadsPrice: 0.4,
55+
outputPrice: 20,
56+
})
57+
expect(openAiNativeModels["gpt-5.6-terra"]).toMatchObject({
58+
contextWindow: 1_050_000,
59+
inputPrice: 2,
60+
cacheWritesPrice: 2.5,
61+
cacheReadsPrice: 0.2,
62+
outputPrice: 12,
63+
})
64+
expect(openAiNativeModels["gpt-5.6-luna"]).toMatchObject({
65+
contextWindow: 1_050_000,
66+
inputPrice: 0.2,
67+
cacheWritesPrice: 0.25,
68+
cacheReadsPrice: 0.02,
69+
outputPrice: 1.2,
70+
})
71+
})
72+
})

‎packages/types/src/model.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ export const modelInfoSchema = z.object({
127127
.optional(),
128128
requiredReasoningEffort: z.boolean().optional(),
129129
preserveReasoning: z.boolean().optional(),
130+
// Some OpenAI-compatible gateways require a Responses-backed route for tool calls.
131+
requiresResponsesApi: z.boolean().optional(),
130132
supportedParameters: z.array(modelParametersSchema).optional(),
131133
inputPrice: z.number().optional(),
132134
outputPrice: z.number().optional(),

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,22 @@ export const openAiCodexDefaultModelId: OpenAiCodexModelId = "gpt-5.6-sol"
2424
* Costs are 0 as they are covered by the subscription.
2525
*/
2626
export const openAiCodexModels = {
27+
"gpt-6-astra": {
28+
maxTokens: 128000,
29+
contextWindow: 872000,
30+
includedTools: ["apply_patch"],
31+
excludedTools: ["apply_diff", "write_to_file"],
32+
supportsImages: true,
33+
supportsPromptCache: true,
34+
supportsReasoningEffort: ["low", "medium", "high", "xhigh", "max"],
35+
requiredReasoningEffort: true,
36+
reasoningEffort: "low",
37+
inputPrice: 0,
38+
outputPrice: 0,
39+
supportsVerbosity: true,
40+
supportsTemperature: false,
41+
description: "GPT-6 Astra: OpenAI's most capable model for complex, demanding work via ChatGPT subscription",
42+
},
2743
"gpt-5.6-sol": {
2844
maxTokens: 128000,
2945
contextWindow: 372000,

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

Lines changed: 120 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,49 @@ export const OPENAI_API_PROTOCOL = "openai"
1717
export const openAiNativeDefaultModelId: OpenAiNativeModelId = "gpt-5.6-sol"
1818

1919
export const openAiNativeModels = {
20+
"gpt-6-astra": {
21+
maxTokens: 128000,
22+
contextWindow: 1_050_000,
23+
includedTools: ["apply_patch"],
24+
excludedTools: ["apply_diff", "write_to_file"],
25+
supportsImages: true,
26+
supportsPromptCache: true,
27+
supportsReasoningEffort: ["low", "medium", "high", "xhigh", "max"],
28+
requiredReasoningEffort: true,
29+
reasoningEffort: "medium",
30+
inputPrice: 10.0,
31+
outputPrice: 50.0,
32+
cacheWritesPrice: 12.5,
33+
cacheReadsPrice: 1.0,
34+
longContextPricing: {
35+
thresholdTokens: 272_000,
36+
inputPriceMultiplier: 2,
37+
outputPriceMultiplier: 1.5,
38+
cacheWritesPriceMultiplier: 2,
39+
cacheReadsPriceMultiplier: 2,
40+
appliesToServiceTiers: ["default", "flex", "priority"],
41+
},
42+
supportsTemperature: false,
43+
tiers: [
44+
{
45+
name: "flex",
46+
contextWindow: 1_050_000,
47+
inputPrice: 5.0,
48+
outputPrice: 25.0,
49+
cacheWritesPrice: 6.25,
50+
cacheReadsPrice: 0.5,
51+
},
52+
{
53+
name: "priority",
54+
contextWindow: 1_050_000,
55+
inputPrice: 20.0,
56+
outputPrice: 100.0,
57+
cacheWritesPrice: 25.0,
58+
cacheReadsPrice: 2.0,
59+
},
60+
],
61+
description: "GPT-6 Astra: OpenAI's most capable model for complex reasoning and end-to-end agentic work",
62+
},
2063
"gpt-5.6-sol": {
2164
maxTokens: 128000,
2265
contextWindow: 1_050_000,
@@ -26,21 +69,37 @@ export const openAiNativeModels = {
2669
supportsPromptCache: true,
2770
supportsReasoningEffort: ["none", "low", "medium", "high", "xhigh", "max"],
2871
reasoningEffort: "medium",
29-
inputPrice: 5.0,
30-
outputPrice: 30.0,
31-
cacheWritesPrice: 6.25,
32-
cacheReadsPrice: 0.5,
72+
inputPrice: 4.0,
73+
outputPrice: 20.0,
74+
cacheWritesPrice: 5.0,
75+
cacheReadsPrice: 0.4,
3376
longContextPricing: {
3477
thresholdTokens: 272_000,
3578
inputPriceMultiplier: 2,
3679
outputPriceMultiplier: 1.5,
37-
appliesToServiceTiers: ["default", "flex"],
80+
cacheWritesPriceMultiplier: 2,
81+
cacheReadsPriceMultiplier: 2,
82+
appliesToServiceTiers: ["default", "flex", "priority"],
3883
},
3984
supportsVerbosity: true,
4085
supportsTemperature: false,
4186
tiers: [
42-
{ name: "flex", contextWindow: 1_050_000, inputPrice: 2.5, outputPrice: 15.0, cacheReadsPrice: 0.25 },
43-
{ name: "priority", contextWindow: 1_050_000, inputPrice: 12.5, outputPrice: 75.0, cacheReadsPrice: 1.25 },
87+
{
88+
name: "flex",
89+
contextWindow: 1_050_000,
90+
inputPrice: 2.0,
91+
outputPrice: 10.0,
92+
cacheWritesPrice: 2.5,
93+
cacheReadsPrice: 0.2,
94+
},
95+
{
96+
name: "priority",
97+
contextWindow: 1_050_000,
98+
inputPrice: 8.0,
99+
outputPrice: 40.0,
100+
cacheWritesPrice: 10.0,
101+
cacheReadsPrice: 0.8,
102+
},
44103
],
45104
description: "GPT-5.6 Sol: OpenAI's flagship model for frontier reasoning, coding, and agentic workflows",
46105
},
@@ -53,40 +112,81 @@ export const openAiNativeModels = {
53112
supportsPromptCache: true,
54113
supportsReasoningEffort: ["none", "low", "medium", "high", "xhigh", "max"],
55114
reasoningEffort: "medium",
56-
inputPrice: 2.5,
57-
outputPrice: 15.0,
58-
cacheWritesPrice: 3.125,
59-
cacheReadsPrice: 0.25,
115+
inputPrice: 2.0,
116+
outputPrice: 12.0,
117+
cacheWritesPrice: 2.5,
118+
cacheReadsPrice: 0.2,
60119
longContextPricing: {
61120
thresholdTokens: 272_000,
62121
inputPriceMultiplier: 2,
63122
outputPriceMultiplier: 1.5,
64-
appliesToServiceTiers: ["default", "flex"],
123+
cacheWritesPriceMultiplier: 2,
124+
cacheReadsPriceMultiplier: 2,
125+
appliesToServiceTiers: ["default", "flex", "priority"],
65126
},
66127
supportsVerbosity: true,
67128
supportsTemperature: false,
68129
tiers: [
69-
{ name: "flex", contextWindow: 1_050_000, inputPrice: 1.25, outputPrice: 7.5, cacheReadsPrice: 0.125 },
70-
{ name: "priority", contextWindow: 1_050_000, inputPrice: 6.25, outputPrice: 37.5, cacheReadsPrice: 0.625 },
130+
{
131+
name: "flex",
132+
contextWindow: 1_050_000,
133+
inputPrice: 1.0,
134+
outputPrice: 6.0,
135+
cacheWritesPrice: 1.25,
136+
cacheReadsPrice: 0.1,
137+
},
138+
{
139+
name: "priority",
140+
contextWindow: 1_050_000,
141+
inputPrice: 4.0,
142+
outputPrice: 24.0,
143+
cacheWritesPrice: 5.0,
144+
cacheReadsPrice: 0.4,
145+
},
71146
],
72147
description: "GPT-5.6 Terra: Balanced everyday model with GPT-5.5-competitive performance at 2x lower cost",
73148
},
74149
"gpt-5.6-luna": {
75150
maxTokens: 128000,
76-
contextWindow: 400000,
151+
contextWindow: 1_050_000,
77152
includedTools: ["apply_patch"],
78153
excludedTools: ["apply_diff", "write_to_file"],
79154
supportsImages: true,
80155
supportsPromptCache: true,
81156
supportsReasoningEffort: ["none", "low", "medium", "high", "xhigh", "max"],
82157
reasoningEffort: "medium",
83-
inputPrice: 1.0,
84-
outputPrice: 6.0,
85-
cacheWritesPrice: 1.25,
86-
cacheReadsPrice: 0.1,
158+
inputPrice: 0.2,
159+
outputPrice: 1.2,
160+
cacheWritesPrice: 0.25,
161+
cacheReadsPrice: 0.02,
162+
longContextPricing: {
163+
thresholdTokens: 272_000,
164+
inputPriceMultiplier: 2,
165+
outputPriceMultiplier: 1.5,
166+
cacheWritesPriceMultiplier: 2,
167+
cacheReadsPriceMultiplier: 2,
168+
appliesToServiceTiers: ["default", "flex", "priority"],
169+
},
87170
supportsVerbosity: true,
88171
supportsTemperature: false,
89-
tiers: [{ name: "flex", contextWindow: 400000, inputPrice: 0.5, outputPrice: 3.0, cacheReadsPrice: 0.05 }],
172+
tiers: [
173+
{
174+
name: "flex",
175+
contextWindow: 1_050_000,
176+
inputPrice: 0.1,
177+
outputPrice: 0.6,
178+
cacheWritesPrice: 0.125,
179+
cacheReadsPrice: 0.01,
180+
},
181+
{
182+
name: "priority",
183+
contextWindow: 1_050_000,
184+
inputPrice: 0.4,
185+
outputPrice: 2.4,
186+
cacheWritesPrice: 0.5,
187+
cacheReadsPrice: 0.04,
188+
},
189+
],
90190
description: "GPT-5.6 Luna: The fastest, most affordable member of the GPT-5.6 family",
91191
},
92192
"gpt-5.1-codex-max": {

0 commit comments

Comments
 (0)