OpenAI's Codex Security CLI and TypeScript SDK for finding, validating, and fixing security vulnerabilities. npm: https://www.npmjs.com/package/@openai/codex-security
TypeScript ai-securityapplication-securityclicode-scanningcodexcodex-securitycybersecuritydevsecopsnodejsnpmopenaisdksecuritytypescriptvulnerability-scanning
fix: pricing for Daybreak (#576)
ianw-oai73f8559adf12
diff --git a/sdk/typescript/src/cost.ts b/sdk/typescript/src/cost.tsindex 764a1e759..dc2710511 100644--- a/sdk/typescript/src/cost.ts+++ b/sdk/typescript/src/cost.ts@@ -95,6 +95,9 @@ const MODEL_PRICING_NANODOLLARS: Readonly<Record<string, ModelPricing>> = {"gpt-5.6-sol": [5_000, 500, 6_250, 30_000],"gpt-5.6-terra": [2_000, 200, 2_500, 12_000],"gpt-5.6-luna": [200, 20, 250, 1_200],+ // https://developers.openai.com/api/docs/pricing#cyber-models+ "gpt-daybreak-blue-latest": [5_000, 500, 6_250, 30_000],+ "gpt-daybreak-red-latest": [12_500, 1_250, 15_625, 75_000],};const COST_POLL_INTERVAL_MS = 100;diff --git a/sdk/typescript/tests-ts/api.test.ts b/sdk/typescript/tests-ts/api.test.tsindex ead5d09c2..0c547f889 100644--- a/sdk/typescript/tests-ts/api.test.ts+++ b/sdk/typescript/tests-ts/api.test.ts@@ -3117,7 +3117,12 @@ describe("CodexSecurity orchestration", () => {}});- test("uses selected profile pricing for live and persisted scan cost", async () => {+ const pricedModels = [+ "gpt-5.6-terra",+ "gpt-daybreak-blue-latest",+ "gpt-daybreak-red-latest",+ ];+ test.each(pricedModels)("tracks live and saved %s costs", async (model) => {const root = await temporaryDirectory();const repository = join(root, "repository");const codexHome = join(root, "codex-home");@@ -3133,7 +3138,7 @@ describe("CodexSecurity orchestration", () => {output_tokens: 3,reasoning_output_tokens: 1,};- const expectedCost = estimateScanCost("gpt-5.6-terra", usage);+ const expectedCost = estimateScanCost(model, usage);expect(expectedCost).not.toBeNull();if (expectedCost === null) throw new Error("Missing selected-model price");@@ -3147,7 +3152,7 @@ describe("CodexSecurity orchestration", () => {model_reasoning_effort: "low",profiles: {review: {- model: "gpt-5.6-terra",+ model,model_reasoning_effort: "high",},},@@ -3190,7 +3195,7 @@ describe("CodexSecurity orchestration", () => {onCost: (cost) => costs.push({ ...cost }),});- expect(result.turnResult.model).toBe("gpt-5.6-terra");+ expect(result.turnResult.model).toBe(model);expect(result.cost).toEqual(expectedCost);expect(costs).toEqual([expectedCost]);diff --git a/sdk/typescript/tests-ts/cost.test.ts b/sdk/typescript/tests-ts/cost.test.tsindex ce3fa8f4a..ca006c27c 100644--- a/sdk/typescript/tests-ts/cost.test.ts+++ b/sdk/typescript/tests-ts/cost.test.ts@@ -184,6 +184,8 @@ describe("scan cost", () => {for (const [model, expectedUsd] of [["openai.gpt-5.6", 35],["openai.gpt-5.6-sol", 35],+ ["openai.gpt-daybreak-blue-latest", 35],+ ["openai.gpt-daybreak-red-latest", 87.5],["openai.gpt-5.6-terra", 14],["openai.gpt-5.6-luna", 1.4],] as const) {@@ -196,8 +198,10 @@ describe("scan cost", () => {expect(estimateScanCost("openai.unknown-model", usage)).toBeNull();});- test("uses current Terra and Luna input, cache, and output rates", () => {+ test("uses current input, cache, and output rates", () => {for (const [model, input, cached, write, output] of [+ ["gpt-daybreak-blue-latest", 5, 0.5, 6.25, 30],+ ["gpt-daybreak-red-latest", 12.5, 1.25, 15.625, 75],["gpt-5.6-terra", 2, 0.2, 2.5, 12],["gpt-5.6-luna", 0.2, 0.02, 0.25, 1.2],] as const) {