const CODEX_FAST_MODE_SUPPORTED_MODEL_PREFIXES = [
    "gpt-5",
    "gpt-4.1",
    "o3",
    "o4-mini",
];
export const CODEX_FAST_MODE_FEATURE = {
    type: "toggle",
    id: "fast_mode",
    label: "Fast",
    description: "Priority inference at 2x usage",
    tooltip: "Toggle fast mode",
    icon: "zap",
};
export const CODEX_PLAN_MODE_FEATURE = {
    type: "toggle",
    id: "plan_mode",
    label: "Plan",
    description: "Switch Codex into planning-only collaboration mode",
    tooltip: "Toggle plan mode",
    icon: "list-todo",
};
function normalizeCodexModelId(modelId) {
    const normalized = typeof modelId === "string" ? modelId.trim() : "";
    return normalized.length > 0 ? normalized : null;
}
export function codexModelSupportsFastMode(modelId) {
    const normalizedModelId = normalizeCodexModelId(modelId);
    if (!normalizedModelId) {
        return false;
    }
    return CODEX_FAST_MODE_SUPPORTED_MODEL_PREFIXES.some((prefix) => normalizedModelId === prefix || normalizedModelId.startsWith(prefix));
}
export function buildCodexFeatures(input) {
    const features = [];
    if (codexModelSupportsFastMode(input.modelId)) {
        features.push({
            ...CODEX_FAST_MODE_FEATURE,
            value: input.fastModeEnabled,
        });
    }
    if (input.planModeAvailable !== false) {
        features.push({
            ...CODEX_PLAN_MODE_FEATURE,
            value: input.planModeEnabled,
        });
    }
    return features;
}
//# sourceMappingURL=codex-feature-definitions.js.map