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.
This commit is contained in:
1 parent
2afa8dafd1
commit
92c7bdd5bc
3 files changed
+17
-1
No files matched your search
@@ -183,6 +183,8 @@ export const PROVIDER_CAPABILITIES = {
|
|||||||
},
|
},
|
||||||
"codex": {
|
"codex": {
|
||||||
"gpt-6-astra": { vision: true, reasoning: true, search: true, thinkingFormat: "openai", contextWindow: 272000, maxOutput: 128000 },
|
"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": CODEX_GPT_56_SOL_CAPS,
|
||||||
"gpt-5.6-sol-review": CODEX_GPT_56_SOL_CAPS,
|
"gpt-5.6-sol-review": CODEX_GPT_56_SOL_CAPS,
|
||||||
"gpt-5.6-terra": CODEX_GPT_56_DEFAULT_CAPS,
|
"gpt-5.6-terra": CODEX_GPT_56_DEFAULT_CAPS,
|
||||||
|
|||||||
@@ -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-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-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-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": { 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 },
|
"o1-mini": { input: 3.00, output: 12.00, cached: 1.50, reasoning: 18.00, cache_creation: 3.00 },
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { afterEach, describe, expect, it, vi } from "vitest";
|
|||||||
import { CodexExecutor } from "../../open-sse/executors/codex.js";
|
import { CodexExecutor } from "../../open-sse/executors/codex.js";
|
||||||
import { getModelsByProviderId } from "../../open-sse/config/providerModels.js";
|
import { getModelsByProviderId } from "../../open-sse/config/providerModels.js";
|
||||||
import { getCapabilitiesForModel } from "../../open-sse/providers/capabilities.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 { getThinkingLevels } from "../../open-sse/providers/thinkingLevels.js";
|
||||||
import * as proxyFetchModule from "../../open-sse/utils/proxyFetch.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({
|
expect(getCapabilitiesForModel("codex", model)).toMatchObject({
|
||||||
vision: true,
|
vision: true,
|
||||||
reasoning: true,
|
reasoning: true,
|
||||||
|
search: true,
|
||||||
thinkingFormat: "openai",
|
thinkingFormat: "openai",
|
||||||
|
contextWindow: 272000,
|
||||||
|
maxOutput: 128000,
|
||||||
});
|
});
|
||||||
expect(getThinkingLevels("codex", model)).toEqual(["low", "medium", "high", "xhigh", "max"]);
|
expect(getThinkingLevels("codex", model)).toEqual(["low", "medium", "high", "xhigh", "max"]);
|
||||||
expect(getThinkingLevels("codex", `${model}(high)`)).toEqual(entry.thinkingLevels);
|
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", () => {
|
it("keeps a native Responses Lite request intact", () => {
|
||||||
const executor = new CodexExecutor();
|
const executor = new CodexExecutor();
|
||||||
const input = [
|
const input = [
|
||||||
|
|||||||
Reference in new issue
Block a user