128 lines
3.6 KiB
TypeScript
128 lines
3.6 KiB
TypeScript
import type { ModelCapabilities, ServerProviderModel } from "@t3tools/contracts";
|
|
|
|
export const DEFAULT_CODEX_MODEL_CAPABILITIES: ModelCapabilities = {
|
|
reasoningEffortLevels: [
|
|
{ value: "xhigh", label: "Extra High" },
|
|
{ value: "high", label: "High", isDefault: true },
|
|
{ value: "medium", label: "Medium" },
|
|
{ value: "low", label: "Low" },
|
|
],
|
|
supportsFastMode: true,
|
|
supportsThinkingToggle: false,
|
|
contextWindowOptions: [],
|
|
promptInjectedEffortLevels: [],
|
|
};
|
|
|
|
export const BUILT_IN_CODEX_MODELS: ReadonlyArray<ServerProviderModel> = [
|
|
{
|
|
slug: "gpt-5.4",
|
|
name: "GPT-5.4",
|
|
isCustom: false,
|
|
capabilities: {
|
|
reasoningEffortLevels: [
|
|
{ value: "xhigh", label: "Extra High" },
|
|
{ value: "high", label: "High", isDefault: true },
|
|
{ value: "medium", label: "Medium" },
|
|
{ value: "low", label: "Low" },
|
|
],
|
|
supportsFastMode: true,
|
|
supportsThinkingToggle: false,
|
|
contextWindowOptions: [],
|
|
promptInjectedEffortLevels: [],
|
|
},
|
|
},
|
|
{
|
|
slug: "gpt-5.4-mini",
|
|
name: "GPT-5.4 Mini",
|
|
isCustom: false,
|
|
capabilities: {
|
|
reasoningEffortLevels: [
|
|
{ value: "xhigh", label: "Extra High" },
|
|
{ value: "high", label: "High", isDefault: true },
|
|
{ value: "medium", label: "Medium" },
|
|
{ value: "low", label: "Low" },
|
|
],
|
|
supportsFastMode: true,
|
|
supportsThinkingToggle: false,
|
|
contextWindowOptions: [],
|
|
promptInjectedEffortLevels: [],
|
|
},
|
|
},
|
|
{
|
|
slug: "gpt-5.3-codex",
|
|
name: "GPT-5.3 Codex",
|
|
isCustom: false,
|
|
capabilities: {
|
|
reasoningEffortLevels: [
|
|
{ value: "xhigh", label: "Extra High" },
|
|
{ value: "high", label: "High", isDefault: true },
|
|
{ value: "medium", label: "Medium" },
|
|
{ value: "low", label: "Low" },
|
|
],
|
|
supportsFastMode: true,
|
|
supportsThinkingToggle: false,
|
|
contextWindowOptions: [],
|
|
promptInjectedEffortLevels: [],
|
|
},
|
|
},
|
|
{
|
|
slug: "gpt-5.3-codex-spark",
|
|
name: "GPT-5.3 Codex Spark",
|
|
isCustom: false,
|
|
capabilities: {
|
|
reasoningEffortLevels: [
|
|
{ value: "xhigh", label: "Extra High" },
|
|
{ value: "high", label: "High", isDefault: true },
|
|
{ value: "medium", label: "Medium" },
|
|
{ value: "low", label: "Low" },
|
|
],
|
|
supportsFastMode: true,
|
|
supportsThinkingToggle: false,
|
|
contextWindowOptions: [],
|
|
promptInjectedEffortLevels: [],
|
|
},
|
|
},
|
|
{
|
|
slug: "gpt-5.2-codex",
|
|
name: "GPT-5.2 Codex",
|
|
isCustom: false,
|
|
capabilities: {
|
|
reasoningEffortLevels: [
|
|
{ value: "xhigh", label: "Extra High" },
|
|
{ value: "high", label: "High", isDefault: true },
|
|
{ value: "medium", label: "Medium" },
|
|
{ value: "low", label: "Low" },
|
|
],
|
|
supportsFastMode: true,
|
|
supportsThinkingToggle: false,
|
|
contextWindowOptions: [],
|
|
promptInjectedEffortLevels: [],
|
|
},
|
|
},
|
|
{
|
|
slug: "gpt-5.2",
|
|
name: "GPT-5.2",
|
|
isCustom: false,
|
|
capabilities: {
|
|
reasoningEffortLevels: [
|
|
{ value: "xhigh", label: "Extra High" },
|
|
{ value: "high", label: "High", isDefault: true },
|
|
{ value: "medium", label: "Medium" },
|
|
{ value: "low", label: "Low" },
|
|
],
|
|
supportsFastMode: true,
|
|
supportsThinkingToggle: false,
|
|
contextWindowOptions: [],
|
|
promptInjectedEffortLevels: [],
|
|
},
|
|
},
|
|
];
|
|
|
|
export function getCodexModelCapabilities(model: string | null | undefined): ModelCapabilities {
|
|
const slug = model?.trim();
|
|
return (
|
|
BUILT_IN_CODEX_MODELS.find((candidate) => candidate.slug === slug)?.capabilities ??
|
|
DEFAULT_CODEX_MODEL_CAPABILITIES
|
|
);
|
|
}
|