From 92c7bdd5bc1ff79fc226b35a38b391a6535a318f Mon Sep 17 00:00:00 2001 From: semihisikman Date: Mon, 28 Sep 2026 19:07:28 +0700 Subject: [PATCH] fix(codex): add GPT-6 Sol/Luna capabilities and official pricing Add explicit capability entries for gpt-6-sol and gpt-6-luna (vision, reasoning, search, 272k context, 128k max output) and update GPT-6 pricing to OpenAI's official standard short-context rates. --- open-sse/providers/capabilities.js | 2 ++ open-sse/providers/pricing.js | 6 +++++- tests/unit/codex-gpt6-lite.test.js | 10 ++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/open-sse/providers/capabilities.js b/open-sse/providers/capabilities.js index 5b52516d..deda5cfb 100644 --- a/open-sse/providers/capabilities.js +++ b/open-sse/providers/capabilities.js @@ -183,6 +183,8 @@ export const PROVIDER_CAPABILITIES = { }, "codex": { "gpt-6-astra": { vision: true, reasoning: true, search: true, thinkingFormat: "openai", contextWindow: 272000, maxOutput: 128000 }, + "gpt-6-sol": { vision: true, reasoning: true, search: true, thinkingFormat: "openai", contextWindow: 272000, maxOutput: 128000 }, + "gpt-6-luna": { vision: true, reasoning: true, search: true, thinkingFormat: "openai", contextWindow: 272000, maxOutput: 128000 }, "gpt-5.6-sol": CODEX_GPT_56_SOL_CAPS, "gpt-5.6-sol-review": CODEX_GPT_56_SOL_CAPS, "gpt-5.6-terra": CODEX_GPT_56_DEFAULT_CAPS, diff --git a/open-sse/providers/pricing.js b/open-sse/providers/pricing.js index 0cdd6844..09d896a5 100644 --- a/open-sse/providers/pricing.js +++ b/open-sse/providers/pricing.js @@ -73,7 +73,11 @@ export const MODEL_PRICING = { "gpt-5.6-luna": { input: 1.00, output: 6.00, cached: 0.10, reasoning: 6.00, cache_creation: 1.00 }, "gpt-5.6-terra": { input: 2.50, output: 15.00, cached: 0.25, reasoning: 15.00, cache_creation: 2.50 }, "gpt-5.6-sol": { input: 5.00, output: 30.00, cached: 0.50, reasoning: 30.00, cache_creation: 5.00 }, - "gpt-6-astra": { input: 5.00, output: 30.00, cached: 0.50, reasoning: 30.00, cache_creation: 5.00 }, + // OpenAI Standard short-context pricing (developers.openai.com/api/docs/pricing). + // Long-context pricing is higher, but this table currently stores one rate per model. + "gpt-6-astra": { input: 10.00, output: 50.00, cached: 1.00, reasoning: 50.00, cache_creation: 12.50 }, + "gpt-6-sol": { input: 2.00, output: 10.00, cached: 0.20, reasoning: 10.00, cache_creation: 2.50 }, + "gpt-6-luna": { input: 0.10, output: 0.50, cached: 0.01, reasoning: 0.50, cache_creation: 0.125 }, "o1": { input: 15.00, output: 60.00, cached: 7.50, reasoning: 90.00, cache_creation: 15.00 }, "o1-mini": { input: 3.00, output: 12.00, cached: 1.50, reasoning: 18.00, cache_creation: 3.00 }, diff --git a/tests/unit/codex-gpt6-lite.test.js b/tests/unit/codex-gpt6-lite.test.js index aaf8d3f2..25182652 100644 --- a/tests/unit/codex-gpt6-lite.test.js +++ b/tests/unit/codex-gpt6-lite.test.js @@ -3,6 +3,7 @@ import { afterEach, describe, expect, it, vi } from "vitest"; import { CodexExecutor } from "../../open-sse/executors/codex.js"; import { getModelsByProviderId } from "../../open-sse/config/providerModels.js"; import { getCapabilitiesForModel } from "../../open-sse/providers/capabilities.js"; +import { getPricingForModel } from "../../open-sse/providers/pricing.js"; import { getThinkingLevels } from "../../open-sse/providers/thinkingLevels.js"; import * as proxyFetchModule from "../../open-sse/utils/proxyFetch.js"; @@ -17,12 +18,21 @@ describe("Codex GPT-6 Sol/Luna transport", () => { expect(getCapabilitiesForModel("codex", model)).toMatchObject({ vision: true, reasoning: true, + search: true, thinkingFormat: "openai", + contextWindow: 272000, + maxOutput: 128000, }); expect(getThinkingLevels("codex", model)).toEqual(["low", "medium", "high", "xhigh", "max"]); expect(getThinkingLevels("codex", `${model}(high)`)).toEqual(entry.thinkingLevels); }); + it("uses official OpenAI Standard pricing for GPT-6", () => { + expect(getPricingForModel("codex", "gpt-6-astra")).toMatchObject({ input: 10, cached: 1, cache_creation: 12.5, output: 50 }); + expect(getPricingForModel("codex", "gpt-6-sol")).toMatchObject({ input: 2, cached: 0.2, cache_creation: 2.5, output: 10 }); + expect(getPricingForModel("codex", "gpt-6-luna")).toMatchObject({ input: 0.1, cached: 0.01, cache_creation: 0.125, output: 0.5 }); + }); + it("keeps a native Responses Lite request intact", () => { const executor = new CodexExecutor(); const input = [