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): add GPT-6-Cyber cost estimates (#2359)

ianw-oai23c66767534e
diff --git a/sdk/typescript/src/cost-model.ts b/sdk/typescript/src/cost-model.ts
index 34853147e..98200d173 100644
--- a/sdk/typescript/src/cost-model.ts
+++ b/sdk/typescript/src/cost-model.ts
@@ -93,14 +93,15 @@ const MODEL_PRICING_NANODOLLARS: Readonly<Record<string, ModelPricing>> = {
"gpt-5.6-luna": [200, 20, 250, 1_200],
// https://developers.openai.com/api/docs/pricing#cyber-models
"gpt-5.6-cyber": [12_500, 1_250, 15_625, 75_000],
+ "gpt-6-cyber": [20_000, 2_000, 25_000, 100_000],
};
// 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. GPT-5.6-Cyber has no verified
-// long-context rate in the pricing table, so its upper estimate stays unavailable.
+// which usage received long-context pricing. GPT-5.6-Cyber and GPT-6-Cyber have no
+// verified long-context rates, so their upper estimates stay unavailable.
const LONG_CONTEXT_PRICING_NANODOLLARS: Readonly<Record<string, ModelPricing>> =
{
"gpt-5.5": [10_000, 1_000, 10_000, 45_000],
@@ -251,9 +252,11 @@ export function estimateScanCost(
? "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",
+ : pricingModel === "gpt-6-cyber"
+ ? "2026-11-05"
+ : 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 05f345f62..b48d3e705 100644
--- a/sdk/typescript/tests-ts/api.test.ts
+++ b/sdk/typescript/tests-ts/api.test.ts
@@ -699,6 +699,7 @@ describe("CodexSecurity orchestration", () => {
).resolves.toMatchObject({ model: "gpt-5.6-sol", maxCostUsd: 5 });
for (const model of [
"gpt-6-astra",
+ "gpt-6-cyber",
"gpt-6-sol",
"gpt-6.1-sol",
"gpt-6-luna",
@@ -14461,6 +14462,7 @@ if __name__ == "__main__":
});
const prices = [
{ model: "gpt-6-astra", min: 0.000232, max: 0.000429 },
+ { model: "gpt-6-cyber", min: 0.000464, max: null },
{ model: "gpt-5.6-cyber", min: 0.0003275, max: null },
];
test.each(prices)("tracks live and saved $model costs", async (price) => {
diff --git a/sdk/typescript/tests-ts/cost-context.test.ts b/sdk/typescript/tests-ts/cost-context.test.ts
index f859c8479..2e10b1895 100644
--- a/sdk/typescript/tests-ts/cost-context.test.ts
+++ b/sdk/typescript/tests-ts/cost-context.test.ts
@@ -83,32 +83,43 @@ test("prices the exact Bedrock Daybreak Blue ID with AWS short and long context
expect(estimateScanCost("gpt-daybreak-blue-5.6-sol", usage)).toBeNull();
});
-test("prices the exact OpenAI Cyber ID without inventing long-context rates", () => {
- const cost = estimateScanCost("gpt-5.6-cyber", {
- input_tokens: 1_000_000,
- cached_input_tokens: 200_000,
- cache_write_input_tokens: 300_000,
- output_tokens: 100_000,
- })!;
- expect(cost).toMatchObject({
+test.each([
+ {
model: "gpt-5.6-cyber",
estimatedUsd: 18.6875,
- estimatedUsdRange: { min: 18.6875, max: null, context: "unknown" },
- pricing: {
- source: "https://developers.openai.com/api/docs/pricing",
- asOf: "2026-10-06",
- serviceTier: "standard",
- context: "short",
- usdPerMillionTokens: {
- input: 12.5,
- cacheRead: 1.25,
- cacheWrite: 15.625,
- output: 75,
+ asOf: "2026-10-06",
+ rates: { input: 12.5, cacheRead: 1.25, cacheWrite: 15.625, output: 75 },
+ },
+ {
+ model: "gpt-6-cyber",
+ estimatedUsd: 27.9,
+ asOf: "2026-11-05",
+ rates: { input: 20, cacheRead: 2, cacheWrite: 25, output: 100 },
+ },
+])(
+ "prices $model without inventing long-context rates",
+ ({ model, estimatedUsd, asOf, rates }) => {
+ const cost = estimateScanCost(model, {
+ input_tokens: 1_000_000,
+ cached_input_tokens: 200_000,
+ cache_write_input_tokens: 300_000,
+ output_tokens: 100_000,
+ })!;
+ expect(cost).toMatchObject({
+ model,
+ estimatedUsd,
+ estimatedUsdRange: { min: estimatedUsd, max: null, context: "unknown" },
+ pricing: {
+ source: "https://developers.openai.com/api/docs/pricing",
+ asOf,
+ serviceTier: "standard",
+ context: "short",
+ usdPerMillionTokens: rates,
},
- },
- });
- expect(cost.pricing).not.toHaveProperty("longContextUsdPerMillionTokens");
-});
+ });
+ expect(cost.pricing).not.toHaveProperty("longContextUsdPerMillionTokens");
+ },
+);
test("prices the exact Bedrock Daybreak Red ID without inventing long-context rates", () => {
const usage = {