From dec820b97e21d1fe46d80448c66a531110afead1 Mon Sep 17 00:00:00 2001 From: MrBeanDev Date: Thu, 1 Oct 2026 10:12:19 +0700 Subject: [PATCH] feat(codex): add GPT-6.1 Sol - registry entry with responsesLite + low..max thinking levels (matches gpt-6-sol) - pricing: $2 input / $0.10 cached / $2.50 cache write / $10 output per 1M --- open-sse/providers/pricing.js | 1 + open-sse/providers/registry/codex.js | 1 + tests/unit/codex-gpt6-lite.test.js | 10 +++++++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/open-sse/providers/pricing.js b/open-sse/providers/pricing.js index 4b62fa86..45df9d22 100644 --- a/open-sse/providers/pricing.js +++ b/open-sse/providers/pricing.js @@ -78,6 +78,7 @@ export const MODEL_PRICING = { // 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.1-sol": { input: 2.00, output: 10.00, cached: 0.10, reasoning: 10.00, cache_creation: 2.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 }, diff --git a/open-sse/providers/registry/codex.js b/open-sse/providers/registry/codex.js index 15a38784..abc5ec26 100644 --- a/open-sse/providers/registry/codex.js +++ b/open-sse/providers/registry/codex.js @@ -52,6 +52,7 @@ export default { }, }, models: [ + { id: "gpt-6.1-sol", name: "GPT 6.1 Sol", responsesLite: true, thinkingLevels: GPT_6_LITE_THINKING_LEVELS }, { id: "gpt-6-astra", name: "GPT 6.0 Astra" }, { id: "gpt-6-astra[1m]", name: "GPT 6.0 Astra (extended context)", upstreamModelId: "gpt-6-astra" }, { id: "gpt-6-sol", name: "GPT 6.0 Sol", responsesLite: true, thinkingLevels: GPT_6_LITE_THINKING_LEVELS }, diff --git a/tests/unit/codex-gpt6-lite.test.js b/tests/unit/codex-gpt6-lite.test.js index 77cb8ed7..534244b0 100644 --- a/tests/unit/codex-gpt6-lite.test.js +++ b/tests/unit/codex-gpt6-lite.test.js @@ -11,7 +11,7 @@ const credentials = { connectionId: "fixture", accessToken: "fixture-token" }; afterEach(() => vi.restoreAllMocks()); describe("Codex GPT-6 Sol/Luna transport", () => { - it.each(["gpt-6-sol", "gpt-6-luna"])("lists %s with Codex capabilities", (model) => { + it.each(["gpt-6.1-sol", "gpt-6-sol", "gpt-6-luna"])("lists %s with Codex capabilities", (model) => { const entry = getModelsByProviderId("codex").find((item) => item.id === model); expect(entry?.responsesLite).toBe(true); expect(entry?.thinkingLevels).toEqual(["low", "medium", "high", "xhigh", "max"]); @@ -175,6 +175,14 @@ describe("Codex GPT-6 Sol/Luna transport", () => { expect(body.reasoning.context).toBe("all_turns"); }); + it("maps GPT-6.1 Sol's Codex-only ultra effort to max", () => { + const body = new CodexExecutor().transformRequest("gpt-6.1-sol", { + model: "gpt-6.1-sol", input: "hello", reasoning: { effort: "ultra" }, + }, true, credentials); + + expect(body.reasoning).toEqual({ effort: "max", context: "all_turns" }); + }); + it("sends the Lite shape and header in the actual outbound request", async () => { const fetchMock = vi.spyOn(proxyFetchModule, "proxyAwareFetch").mockResolvedValue({ ok: true, status: 200, headers: new Map(),