Skip to content
This repository was archived by the owner on Feb 23, 2026. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,13 +297,15 @@ export class AccountManager {
private accounts: ManagedAccount[] = [];
private cursor = 0;
private currentAccountIndexByFamily: Record<ModelFamily, number> = {
"gpt-5.3-codex": -1,
"gpt-5.2-codex": -1,
"codex-max": -1,
codex: -1,
"gpt-5.2": -1,
"gpt-5.1": -1,
};
private sessionOffsetApplied: Record<ModelFamily, boolean> = {
"gpt-5.3-codex": false,
"gpt-5.2-codex": false,
"codex-max": false,
codex: false,
Expand Down
1 change: 1 addition & 0 deletions lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 8 additions & 0 deletions lib/prompts/codex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const __dirname = dirname(__filename);
* Based on codex-rs/core/src/model_family.rs logic
*/
const PROMPT_FILES: Record<ModelFamily, string> = {
"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",
Expand All @@ -32,6 +33,7 @@ const PROMPT_FILES: Record<ModelFamily, string> = {
* Cache file mapping for each model family
*/
const CACHE_FILES: Record<ModelFamily, string> = {
"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",
Expand All @@ -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")
Expand Down