feat(codex): add GPT-6 Sol and Luna support

- Add GPT-6 Sol and Luna to the Codex model registry.
- Send both models using the Codex 0.155 Responses Lite request shape, including `reasoning.context: "all_turns"`.
This commit is contained in:
mxlanparty@dp14
2026-09-23 12:10:03 +07:00
parent 69cc1aa987
commit 95600db17b
4 changed files with 161 additions and 13 deletions

View File

@@ -3,6 +3,7 @@
import { getCapabilitiesForModel } from "./capabilities.js";
import { matchPattern } from "./pricing.js";
import { resolveKiroEffortPath } from "../config/kiroConstants.js";
import { getProviderModels } from "../config/providerModels.js";
// Shared level sets (deduped) — verified against provider docs + wire in thinkingUnified.applyFormat.
const L = {
@@ -69,10 +70,14 @@ export function getThinkingLevels(provider, model) {
if (provider === "kiro" && resolveKiroEffortPath(model) === null) return null;
const caps = getCapabilitiesForModel(provider, model);
if (!caps.reasoning) return null;
const baseId = String(model || "").replace(/\([^()]+\)\s*$/, "");
const modelLevels = provider === "codex"
? getProviderModels("cx").find((entry) => entry.id === baseId)?.thinkingLevels
: null;
const hit = PATTERN_THINKING.find((entry) =>
(!entry.provider || entry.provider === provider) && matchPattern(entry.pattern, model)
);
let levels = hit?.levels || FORMAT_LEVELS[caps.thinkingFormat] || L.base;
let levels = modelLevels || hit?.levels || FORMAT_LEVELS[caps.thinkingFormat] || L.base;
if (caps.thinkingCanDisable === false) levels = levels.filter((l) => l !== "none");
return levels;
}