Skip to content

OpenAI's Codex Security CLI and TypeScript SDK for finding, validating, and fixing security vulnerabilities. npm: https://www.npmjs.com/package/@openai/codex-security

fix(sdk): restore GPT-6 Sol cost estimates and budgets (#1585)

Michael D'Angelo5bd62db08d27
diff --git a/sdk/typescript/src/cost-model.ts b/sdk/typescript/src/cost-model.ts
index dd0506d78..a820aaaf8 100644
--- a/sdk/typescript/src/cost-model.ts
+++ b/sdk/typescript/src/cost-model.ts
@@ -88,6 +88,7 @@ const MODEL_PRICING_NANODOLLARS: Readonly<Record<string, ModelPricing>> = {
// GPT-5.5 has no additional cache-write charge.
"gpt-5.5": [5_000, 500, 5_000, 30_000],
"gpt-5.5-2026-04-23": [5_000, 500, 5_000, 30_000],
+ "gpt-6-sol": [2_000, 200, 2_500, 10_000],
"gpt-6.1-sol": [2_000, 100, 2_500, 10_000],
"gpt-6-astra": [10_000, 1_000, 12_500, 50_000],
"gpt-6-luna": [100, 10, 125, 500],
@@ -103,6 +104,7 @@ const MODEL_PRICING_NANODOLLARS: Readonly<Record<string, ModelPricing>> = {
// Verified Standard rates: https://developers.openai.com/api/docs/pricing
// GPT-5.5: https://developers.openai.com/api/docs/models/gpt-5.5
+// GPT-6 Sol: https://developers.openai.com/api/docs/models/gpt-6-sol
// Do not infer tiers from aggregate scan tokens: the runtime does not report
// which usage received long-context pricing. Cyber/Daybreak Red has no verified
// long-context rate in the pricing table, so its upper estimate stays unavailable.
@@ -110,6 +112,7 @@ const LONG_CONTEXT_PRICING_NANODOLLARS: Readonly<Record<string, ModelPricing>> =
{
"gpt-5.5": [10_000, 1_000, 10_000, 45_000],
"gpt-5.5-2026-04-23": [10_000, 1_000, 10_000, 45_000],
+ "gpt-6-sol": [4_000, 400, 5_000, 15_000],
"gpt-6.1-sol": [4_000, 200, 5_000, 15_000],
"gpt-6-astra": [20_000, 2_000, 25_000, 75_000],
"gpt-6-luna": [200, 20, 250, 750],
@@ -245,14 +248,18 @@ export function estimateScanCost(
? bedrockPricing.source
: pricingModel.startsWith("gpt-5.5")
? "https://developers.openai.com/api/docs/models/gpt-5.5"
- : "https://developers.openai.com/api/docs/pricing",
+ : pricingModel === "gpt-6-sol"
+ ? "https://developers.openai.com/api/docs/models/gpt-6-sol"
+ : "https://developers.openai.com/api/docs/pricing",
asOf: bedrockPricing
? bedrockPricing.asOf
- : pricingModel === "gpt-5.6-cyber"
- ? "2026-10-06"
- : pricingModel === "gpt-6.1-sol" || pricingModel === "gpt-6-luna"
- ? "2026-09-30"
- : "2026-09-14",
+ : pricingModel === "gpt-6-sol"
+ ? "2026-10-10"
+ : pricingModel === "gpt-5.6-cyber"
+ ? "2026-10-06"
+ : pricingModel === "gpt-6.1-sol" || pricingModel === "gpt-6-luna"
+ ? "2026-09-30"
+ : "2026-09-14",
serviceTier: "standard",
context: "short",
usdPerMillionTokens: usdPerMillionTokens(pricing, unitsPerUsd),
diff --git a/sdk/typescript/tests-ts/api.test.ts b/sdk/typescript/tests-ts/api.test.ts
index 5150ada7b..f5c262c63 100644
--- a/sdk/typescript/tests-ts/api.test.ts
+++ b/sdk/typescript/tests-ts/api.test.ts
@@ -1085,8 +1085,10 @@ describe("CodexSecurity orchestration", () => {
).resolves.toMatchObject({ model: "gpt-5.6-sol", maxCostUsd: 5 });
for (const model of [
"gpt-6-astra",
+ "gpt-6-sol",
"gpt-6.1-sol",
"gpt-6-luna",
+ "openai.gpt-6-sol",
"openai.gpt-6.1-sol",
"openai.gpt-6-luna",
]) {
diff --git a/sdk/typescript/tests-ts/cost.test.ts b/sdk/typescript/tests-ts/cost.test.ts
index f5a9c69eb..d074e691c 100644
--- a/sdk/typescript/tests-ts/cost.test.ts
+++ b/sdk/typescript/tests-ts/cost.test.ts
@@ -218,6 +218,45 @@ describe("scan cost", () => {
},
});
});
+ test.each(["gpt-6-sol", "openai.gpt-6-sol"])(
+ "prices every token category and both context ranges for %s",
+ (model) => {
+ expect(
+ estimateScanCost(model, {
+ input_tokens: 1_000_000,
+ cached_input_tokens: 200_000,
+ cache_write_input_tokens: 300_000,
+ output_tokens: 100_000,
+ }),
+ ).toEqual({
+ model,
+ inputTokens: 1_000_000,
+ cachedInputTokens: 200_000,
+ cacheWriteInputTokens: 300_000,
+ outputTokens: 100_000,
+ estimatedUsd: 2.79,
+ estimatedUsdRange: { min: 2.79, max: 5.08, context: "unknown" },
+ pricing: {
+ source: "https://developers.openai.com/api/docs/models/gpt-6-sol",
+ asOf: "2026-10-10",
+ serviceTier: "standard",
+ context: "short",
+ usdPerMillionTokens: {
+ input: 2,
+ cacheRead: 0.2,
+ cacheWrite: 2.5,
+ output: 10,
+ },
+ longContextUsdPerMillionTokens: {
+ input: 4,
+ cacheRead: 0.4,
+ cacheWrite: 5,
+ output: 15,
+ },
+ },
+ });
+ },
+ );
test.each([
[{ cache_write_tokens: 15 }, 15],
[{ cache_write_input_tokens: 0, cache_write_tokens: 15 }, 15],