The open-source app everyone uses to manage agents at work
TypeScript acpxagent-orchestrationagent-skillsagentic-aiai-agentsai-engineeringai-governanceai-toolsautonomous-agentsclaudeclaude-codeclaude-skillscodexhermesllmmcpmulti-agentopenclawproject-managementworkflow-automation
fix(codex-local): order Codex models the way the ChatGPT app does (stacked on #14917) (#14918)
abderrahmen bejaouid9b64ee28edd
diff --git a/packages/adapters/codex-local/src/index.test.ts b/packages/adapters/codex-local/src/index.test.tsindex 855a0c06db..5671557c5a 100644--- a/packages/adapters/codex-local/src/index.test.ts+++ b/packages/adapters/codex-local/src/index.test.ts@@ -14,13 +14,20 @@ describe("codex local adapter metadata", () => {// Default to the concrete gpt-5.6-sol slug — Codex ships no metadata for the bare gpt-5.6// alias, so it must not be advertised or used as the default (it triggers a fallback warning).expect(DEFAULT_CODEX_LOCAL_MODEL).toBe("gpt-5.6-sol");- expect(modelIds.slice(0, 6)).toEqual([- "gpt-5.6-sol",+ // Ordered like the ChatGPT app: newest version first, then by capability within a version (#14878).+ expect(modelIds.slice(0, 12)).toEqual(["gpt-6-astra","gpt-6-sol","gpt-6-luna",+ "gpt-5.6-sol","gpt-5.6-terra","gpt-5.6-luna",+ "gpt-5.5",+ "gpt-5.4",+ "gpt-5.4-mini",+ "gpt-5",+ "gpt-5-mini",+ "gpt-5-nano",]);expect(modelIds).not.toContain("gpt-5.6");expect(isCodexLocalFastModeSupported(DEFAULT_CODEX_LOCAL_MODEL)).toBe(true);diff --git a/packages/adapters/codex-local/src/index.ts b/packages/adapters/codex-local/src/index.tsindex 5d3a95c888..61512939a9 100644--- a/packages/adapters/codex-local/src/index.ts+++ b/packages/adapters/codex-local/src/index.ts@@ -106,22 +106,25 @@ export function isCodexLocalFastModeSupported(model: string | null | undefined):);}+// Ordered the way the ChatGPT app orders Codex models (#14878): newest model version first,+// then by decreasing capability inside each version, older models at the end. The server+// returns this list as written and the model dropdown keeps its order.export const models = [- // DEFAULT_CODEX_LOCAL_MODEL is gpt-5.6-sol, so it doubles as the first (default) 5.6 entry.- { id: DEFAULT_CODEX_LOCAL_MODEL, label: DEFAULT_CODEX_LOCAL_MODEL },{ id: "gpt-6-astra", label: "gpt-6-astra" },{ id: "gpt-6-sol", label: "gpt-6-sol" },{ id: "gpt-6-luna", label: "gpt-6-luna" },+ // DEFAULT_CODEX_LOCAL_MODEL is gpt-5.6-sol, the first 5.6 entry.+ { id: DEFAULT_CODEX_LOCAL_MODEL, label: DEFAULT_CODEX_LOCAL_MODEL },{ id: "gpt-5.6-terra", label: "gpt-5.6-terra" },{ id: "gpt-5.6-luna", label: "gpt-5.6-luna" },{ id: "gpt-5.5", label: "gpt-5.5" },{ id: "gpt-5.4", label: "gpt-5.4" },{ id: "gpt-5.4-mini", label: "gpt-5.4-mini" },{ id: "gpt-5", label: "gpt-5" },- { id: "o3", label: "o3" },- { id: "o4-mini", label: "o4-mini" },{ id: "gpt-5-mini", label: "gpt-5-mini" },{ id: "gpt-5-nano", label: "gpt-5-nano" },+ { id: "o3", label: "o3" },+ { id: "o4-mini", label: "o4-mini" },{ id: "o3-mini", label: "o3-mini" },{ id: "codex-mini-latest", label: "Codex Mini" },];