feat: refine language controls and add per-tier ChatGPT Fast mode

This commit is contained in:
2026-10-25 21:19:48 +03:00
parent f8ce0f21ef
commit 8c564946ef
17 changed files with 488 additions and 37 deletions
+9 -1
View File
@@ -193,6 +193,8 @@ export interface ModelSlot {
model?: { provider: string; id: string };
/** The thinking budget swap. */
thinkingLevel?: ThinkingLevel;
/** Opt-in ChatGPT priority processing for this tier. Absent = off. */
fastMode?: boolean;
}
/** The `models` settings section (owner decision 2026-09-20: a dedicated
@@ -490,7 +492,13 @@ function sanitizeModels(raw: Record<string, unknown>): ModelsSettings {
const out: ModelsSettings = {};
for (const slot of MODEL_SLOTS) {
const cleaned = sanitizeRoleOverride(raw[slot]);
if (cleaned) out[slot] = cleaned;
if (cleaned) {
const value = raw[slot] as Record<string, unknown>;
out[slot] = {
...cleaned,
...(cleaned.model?.provider === "chatgpt" && typeof value.fastMode === "boolean" ? { fastMode: value.fastMode } : {}),
};
}
}
return out;
}