Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
128 changes: 128 additions & 0 deletions packages/types/src/__tests__/openai-models.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { openAiCodexModels } from "../providers/openai-codex.js"
import { openAiNativeDefaultModelId, openAiNativeModels } from "../providers/openai.js"

describe("OpenAI native models", () => {
Expand Down Expand Up @@ -46,6 +47,96 @@ describe("OpenAI native models", () => {
])
})

it("describes GPT-6 Sol and Luna with verified pricing and context metadata", () => {
expect(openAiNativeModels["gpt-6-sol"]).toEqual({
maxTokens: 128_000,
contextWindow: 1_050_000,
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
supportsImages: true,
supportsPromptCache: true,
supportsReasoningEffort: ["none", "low", "medium", "high", "xhigh", "max"],
reasoningEffort: "medium",
inputPrice: 2,
outputPrice: 10,
cacheWritesPrice: 2.5,
cacheReadsPrice: 0.2,
longContextPricing: {
thresholdTokens: 272_000,
inputPriceMultiplier: 2,
outputPriceMultiplier: 1.5,
cacheWritesPriceMultiplier: 2,
cacheReadsPriceMultiplier: 2,
appliesToServiceTiers: ["default", "flex", "priority"],
},
supportsVerbosity: true,
supportsTemperature: false,
tiers: [
{
name: "flex",
contextWindow: 1_050_000,
inputPrice: 1,
outputPrice: 5,
cacheWritesPrice: 1.25,
cacheReadsPrice: 0.1,
},
{
name: "priority",
contextWindow: 1_050_000,
inputPrice: 4,
outputPrice: 20,
cacheWritesPrice: 5,
cacheReadsPrice: 0.4,
},
],
description: "GPT-6 Sol: OpenAI's cost-efficient frontier model for complex coding and agentic workflows",
})

expect(openAiNativeModels["gpt-6-luna"]).toEqual({
maxTokens: 128_000,
contextWindow: 1_050_000,
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
supportsImages: true,
supportsPromptCache: true,
supportsReasoningEffort: ["none", "low", "medium", "high", "xhigh", "max"],
reasoningEffort: "medium",
inputPrice: 0.1,
outputPrice: 0.5,
cacheWritesPrice: 0.125,
cacheReadsPrice: 0.01,
longContextPricing: {
thresholdTokens: 272_000,
inputPriceMultiplier: 2,
outputPriceMultiplier: 1.5,
cacheWritesPriceMultiplier: 2,
cacheReadsPriceMultiplier: 2,
appliesToServiceTiers: ["default", "flex", "priority"],
},
supportsVerbosity: true,
supportsTemperature: false,
tiers: [
{
name: "flex",
contextWindow: 1_050_000,
inputPrice: 0.05,
outputPrice: 0.25,
cacheWritesPrice: 0.0625,
cacheReadsPrice: 0.005,
},
{
name: "priority",
contextWindow: 1_050_000,
inputPrice: 0.2,
outputPrice: 1,
cacheWritesPrice: 0.25,
cacheReadsPrice: 0.02,
},
],
description: "GPT-6 Luna: The fastest, most affordable member of the GPT-6 family",
})
})

it("uses current GPT-5.6 base pricing and context metadata", () => {
expect(openAiNativeModels["gpt-5.6-sol"]).toMatchObject({
contextWindow: 1_050_000,
Expand All @@ -70,3 +161,40 @@ describe("OpenAI native models", () => {
})
})
})

describe("OpenAI Codex models", () => {
it("describes GPT-6 Sol and Luna subscription contracts", () => {
expect(openAiCodexModels["gpt-6-sol"]).toEqual({
maxTokens: 128_000,
contextWindow: 372_000,
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
supportsImages: true,
supportsPromptCache: true,
supportsReasoningEffort: ["none", "low", "medium", "high", "xhigh", "max"],
reasoningEffort: "medium",
inputPrice: 0,
outputPrice: 0,
supportsVerbosity: true,
supportsTemperature: false,
description:
"GPT-6 Sol: OpenAI's cost-efficient frontier model for complex coding and agentic workflows via ChatGPT subscription",
})

expect(openAiCodexModels["gpt-6-luna"]).toEqual({
maxTokens: 128_000,
contextWindow: 372_000,
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
supportsImages: true,
supportsPromptCache: true,
supportsReasoningEffort: ["none", "low", "medium", "high", "xhigh", "max"],
reasoningEffort: "medium",
inputPrice: 0,
outputPrice: 0,
supportsVerbosity: true,
supportsTemperature: false,
description: "GPT-6 Luna: The fastest, most affordable member of the GPT-6 family via ChatGPT subscription",
})
})
})
33 changes: 33 additions & 0 deletions packages/types/src/providers/openai-codex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,39 @@ export const openAiCodexModels = {
supportsTemperature: false,
description: "GPT-6 Astra: OpenAI's most capable model for complex, demanding work via ChatGPT subscription",
},
"gpt-6-sol": {
maxTokens: 128000,
contextWindow: 372000,
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
supportsImages: true,
supportsPromptCache: true,
supportsReasoningEffort: ["none", "low", "medium", "high", "xhigh", "max"],
reasoningEffort: "medium",
// Subscription-based: no per-token costs
inputPrice: 0,
outputPrice: 0,
supportsVerbosity: true,
supportsTemperature: false,
description:
"GPT-6 Sol: OpenAI's cost-efficient frontier model for complex coding and agentic workflows via ChatGPT subscription",
},
"gpt-6-luna": {
maxTokens: 128000,
contextWindow: 372000,
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
supportsImages: true,
supportsPromptCache: true,
supportsReasoningEffort: ["none", "low", "medium", "high", "xhigh", "max"],
reasoningEffort: "medium",
// Subscription-based: no per-token costs
inputPrice: 0,
outputPrice: 0,
supportsVerbosity: true,
supportsTemperature: false,
description: "GPT-6 Luna: The fastest, most affordable member of the GPT-6 family via ChatGPT subscription",
},
Comment on lines +43 to +75

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the only new catalog entries in this PR without test coverage — nothing in the test suite imports openAiCodexModels, so a typo in contextWindow or the tool filters would ship silently. Would it make sense to lock these alongside the native entries in openai-models.test.ts?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

"gpt-5.6-sol": {
maxTokens: 128000,
contextWindow: 372000,
Expand Down
86 changes: 86 additions & 0 deletions packages/types/src/providers/openai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,92 @@ export const openAiNativeModels = {
],
description: "GPT-6 Astra: OpenAI's most capable model for complex reasoning and end-to-end agentic work",
},
"gpt-6-sol": {
maxTokens: 128000,
contextWindow: 1_050_000,
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
supportsImages: true,
supportsPromptCache: true,
supportsReasoningEffort: ["none", "low", "medium", "high", "xhigh", "max"],
reasoningEffort: "medium",
inputPrice: 2.0,
outputPrice: 10.0,
cacheWritesPrice: 2.5,
cacheReadsPrice: 0.2,
longContextPricing: {
thresholdTokens: 272_000,
inputPriceMultiplier: 2,
outputPriceMultiplier: 1.5,
cacheWritesPriceMultiplier: 2,
cacheReadsPriceMultiplier: 2,
appliesToServiceTiers: ["default", "flex", "priority"],
},
supportsVerbosity: true,
supportsTemperature: false,
tiers: [
{
name: "flex",
contextWindow: 1_050_000,
inputPrice: 1.0,
outputPrice: 5.0,
cacheWritesPrice: 1.25,
cacheReadsPrice: 0.1,
},
{
name: "priority",
contextWindow: 1_050_000,
inputPrice: 4.0,
outputPrice: 20.0,
cacheWritesPrice: 5.0,
cacheReadsPrice: 0.4,
},
],
description: "GPT-6 Sol: OpenAI's cost-efficient frontier model for complex coding and agentic workflows",
},
"gpt-6-luna": {
maxTokens: 128000,
contextWindow: 1_050_000,
includedTools: ["apply_patch"],
excludedTools: ["apply_diff", "write_to_file"],
supportsImages: true,
supportsPromptCache: true,
supportsReasoningEffort: ["none", "low", "medium", "high", "xhigh", "max"],
reasoningEffort: "medium",
inputPrice: 0.1,
outputPrice: 0.5,
cacheWritesPrice: 0.125,
cacheReadsPrice: 0.01,
longContextPricing: {
thresholdTokens: 272_000,
inputPriceMultiplier: 2,
outputPriceMultiplier: 1.5,
cacheWritesPriceMultiplier: 2,
cacheReadsPriceMultiplier: 2,
appliesToServiceTiers: ["default", "flex", "priority"],
},
supportsVerbosity: true,
supportsTemperature: false,
tiers: [
{
name: "flex",
contextWindow: 1_050_000,
inputPrice: 0.05,
outputPrice: 0.25,
cacheWritesPrice: 0.0625,
cacheReadsPrice: 0.005,
},
{
name: "priority",
contextWindow: 1_050_000,
inputPrice: 0.2,
outputPrice: 1.0,
cacheWritesPrice: 0.25,
cacheReadsPrice: 0.02,
},
],
description: "GPT-6 Luna: The fastest, most affordable member of the GPT-6 family",
},
"gpt-5.6-sol": {
maxTokens: 128000,
contextWindow: 1_050_000,
Expand Down
Loading