diff --git a/lib/accounts.ts b/lib/accounts.ts index 2e4a294..87060ba 100644 --- a/lib/accounts.ts +++ b/lib/accounts.ts @@ -297,6 +297,7 @@ export class AccountManager { private accounts: ManagedAccount[] = []; private cursor = 0; private currentAccountIndexByFamily: Record = { + "gpt-5.3-codex": -1, "gpt-5.2-codex": -1, "codex-max": -1, codex: -1, @@ -304,6 +305,7 @@ export class AccountManager { "gpt-5.1": -1, }; private sessionOffsetApplied: Record = { + "gpt-5.3-codex": false, "gpt-5.2-codex": false, "codex-max": false, codex: false, diff --git a/lib/constants.ts b/lib/constants.ts index de78e17..76f4b73 100644 --- a/lib/constants.ts +++ b/lib/constants.ts @@ -82,6 +82,7 @@ export const AUTH_LABELS = { /** Model family identifiers for account selection */ export const MODEL_FAMILIES = [ + "gpt-5.3-codex", "gpt-5.2-codex", "codex-max", "codex", diff --git a/lib/prompts/codex.ts b/lib/prompts/codex.ts index 228dac7..6922d94 100644 --- a/lib/prompts/codex.ts +++ b/lib/prompts/codex.ts @@ -21,6 +21,7 @@ const __dirname = dirname(__filename); * Based on codex-rs/core/src/model_family.rs logic */ const PROMPT_FILES: Record = { + "gpt-5.3-codex": "gpt-5.2-codex_prompt.md", "gpt-5.2-codex": "gpt-5.2-codex_prompt.md", "codex-max": "gpt-5.1-codex-max_prompt.md", codex: "gpt_5_codex_prompt.md", @@ -32,6 +33,7 @@ const PROMPT_FILES: Record = { * Cache file mapping for each model family */ const CACHE_FILES: Record = { + "gpt-5.3-codex": "gpt-5.2-codex-instructions.md", "gpt-5.2-codex": "gpt-5.2-codex-instructions.md", "codex-max": "codex-max-instructions.md", codex: "codex-instructions.md", @@ -58,6 +60,12 @@ function ensureCacheMigrated(): void { */ export function getModelFamily(normalizedModel: string): ModelFamily { // Order matters - check more specific patterns first + if ( + normalizedModel.includes("gpt-5.3-codex") || + normalizedModel.includes("gpt 5.3 codex") + ) { + return "gpt-5.3-codex"; + } if ( normalizedModel.includes("gpt-5.2-codex") || normalizedModel.includes("gpt 5.2 codex")