fix: update stale codex model from gpt-5.1-codex-mini to gpt-5.4-mini

The Codex CLI no longer supports gpt-5.1-codex-mini. Update all
references to gpt-5.4-mini, which is available in the current CLI.
This fixes archive-tab Playwright tests that create codex agents
which were erroring due to the unsupported model.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Mohamed Boudra
2026-04-11 09:54:01 +00:00
co-authored by Claude Opus 4.6
parent e641472b07
commit 1a837be8e4
26 changed files with 42 additions and 42 deletions
@@ -131,7 +131,7 @@ export async function seedBottomAnchorAgent(input: {
const lineCount = Math.max(14, input.lineCount ?? 14);
const created = await input.client.createAgent({
provider: "codex",
model: "gpt-5.1-codex-mini",
model: "gpt-5.4-mini",
thinkingOptionId: "low",
modeId: "full-access",
cwd: input.cwd,
+1 -1
View File
@@ -109,7 +109,7 @@ export async function createIdleAgent(
): Promise<ArchiveTabAgent> {
const created = await client.createAgent({
provider: "codex",
model: "gpt-5.1-codex-mini",
model: "gpt-5.4-mini",
thinkingOptionId: "low",
modeId: "full-access",
cwd: input.cwd,
+1 -1
View File
@@ -2,7 +2,7 @@ export const TEST_HOST_LABEL = "localhost";
export const TEST_PROVIDER_PREFERENCES = {
claude: { model: "haiku" },
codex: { model: "gpt-5.1-codex-mini", thinkingOptionId: "low" },
codex: { model: "gpt-5.4-mini", thinkingOptionId: "low" },
} as const;
export function buildDirectTcpConnection(endpoint: string) {
@@ -11,7 +11,7 @@ import { createAllClients, shutdownProviders } from "./provider-registry.js";
import { generateAndApplyAgentMetadata } from "./agent-metadata-generator.js";
import { createWorktree, validateBranchSlug } from "../../utils/worktree.js";
const CODEX_TEST_MODEL = "gpt-5.1-codex-mini";
const CODEX_TEST_MODEL = "gpt-5.4-mini";
const CODEX_TEST_THINKING_OPTION_ID = "low";
const shouldRun = !process.env.CI && !!process.env.OPENAI_API_KEY;
@@ -15,7 +15,7 @@ import { createAgentMcpServer } from "./mcp-server.js";
import { createAllClients, shutdownProviders } from "./provider-registry.js";
import pino from "pino";
const CODEX_TEST_MODEL = "gpt-5.1-codex-mini";
const CODEX_TEST_MODEL = "gpt-5.4-mini";
const CODEX_TEST_THINKING_OPTION_ID = "low";
const hasOpenAICredentials = !!process.env.OPENAI_API_KEY;
@@ -156,7 +156,7 @@ describe("generateStructuredAgentResponseWithFallback", () => {
schema,
providers: [
{ provider: "claude", model: "haiku" },
{ provider: "codex", model: "gpt-5.1-codex-mini" },
{ provider: "codex", model: "gpt-5.4-mini" },
],
runner: async (options) => {
calls.push({
@@ -186,7 +186,7 @@ describe("generateStructuredAgentResponseWithFallback", () => {
schema,
providers: [
{ provider: "claude", model: "haiku" },
{ provider: "codex", model: "gpt-5.1-codex-mini" },
{ provider: "codex", model: "gpt-5.4-mini" },
],
runner: async (options) => {
calls.push({
@@ -198,7 +198,7 @@ describe("generateStructuredAgentResponseWithFallback", () => {
});
expect(result).toEqual({ summary: "ok" });
expect(calls).toEqual([{ provider: "codex", model: "gpt-5.1-codex-mini" }]);
expect(calls).toEqual([{ provider: "codex", model: "gpt-5.4-mini" }]);
});
it("falls back when an available provider fails", async () => {
@@ -216,7 +216,7 @@ describe("generateStructuredAgentResponseWithFallback", () => {
schema,
providers: [
{ provider: "claude", model: "haiku" },
{ provider: "codex", model: "gpt-5.1-codex-mini" },
{ provider: "codex", model: "gpt-5.4-mini" },
],
runner: async (options) => {
calls.push({
@@ -233,7 +233,7 @@ describe("generateStructuredAgentResponseWithFallback", () => {
expect(result).toEqual({ summary: "ok" });
expect(calls).toEqual([
{ provider: "claude", model: "haiku" },
{ provider: "codex", model: "gpt-5.1-codex-mini" },
{ provider: "codex", model: "gpt-5.4-mini" },
]);
});
@@ -252,7 +252,7 @@ describe("generateStructuredAgentResponseWithFallback", () => {
schema,
providers: [
{ provider: "claude", model: "haiku" },
{ provider: "codex", model: "gpt-5.1-codex-mini" },
{ provider: "codex", model: "gpt-5.4-mini" },
{ provider: "opencode", model: "opencode/gpt-5-nano" },
],
runner: async () => {
@@ -93,7 +93,7 @@ export interface StructuredAgentGenerationWithFallbackOptions<T> {
export const DEFAULT_STRUCTURED_GENERATION_PROVIDERS: readonly StructuredGenerationProvider[] = [
{ provider: "claude", model: "haiku" },
{ provider: "codex", model: "gpt-5.1-codex-mini", thinkingOptionId: "low" },
{ provider: "codex", model: "gpt-5.4-mini", thinkingOptionId: "low" },
{ provider: "opencode", model: "opencode/gpt-5-nano" },
] as const;
@@ -138,7 +138,7 @@ export const AGENT_PROVIDER_DEFINITIONS: AgentProviderDefinition[] = [
voice: {
enabled: true,
defaultModeId: "auto",
defaultModel: "gpt-5.1-codex-mini",
defaultModel: "gpt-5.4-mini",
},
},
{
@@ -124,7 +124,7 @@ const hasOpenCode = isBinaryInstalled("opencode");
m.id.includes("gpt-4.1-nano") ||
m.id.includes("gpt-4.1-mini") ||
m.id.includes("gpt-5-nano") ||
m.id.includes("gpt-5.1-codex-mini") ||
m.id.includes("gpt-5.4-mini") ||
m.id.includes("gpt-4o-mini"),
);
@@ -19,8 +19,8 @@ function tmpCwd(): string {
return mkdtempSync(path.join(tmpdir(), "daemon-e2e-"));
}
// Use gpt-5.1-codex-mini with low thinking preset for faster test execution
const CODEX_TEST_MODEL = "gpt-5.1-codex-mini";
// Use gpt-5.4-mini with low thinking preset for faster test execution
const CODEX_TEST_MODEL = "gpt-5.4-mini";
const CODEX_TEST_THINKING_OPTION_ID = "low";
describe("daemon E2E", () => {
@@ -34,7 +34,7 @@ export const agentConfigs = {
},
codex: {
provider: "codex",
model: "gpt-5.1-codex-mini",
model: "gpt-5.4-mini",
thinkingOptionId: "low",
modes: {
full: "full-access",
@@ -18,8 +18,8 @@ function tmpCwd(): string {
return mkdtempSync(path.join(tmpdir(), "daemon-e2e-"));
}
// Use gpt-5.1-codex-mini with low thinking preset for faster test execution
const CODEX_TEST_MODEL = "gpt-5.1-codex-mini";
// Use gpt-5.4-mini with low thinking preset for faster test execution
const CODEX_TEST_MODEL = "gpt-5.4-mini";
const CODEX_TEST_THINKING_OPTION_ID = "low";
describe("daemon E2E", () => {
@@ -7,7 +7,7 @@ import { execSync } from "child_process";
import { createDaemonTestContext, type DaemonTestContext } from "../test-utils/index.js";
import { createWorktree } from "../../utils/worktree.js";
const CODEX_TEST_MODEL = "gpt-5.1-codex-mini";
const CODEX_TEST_MODEL = "gpt-5.4-mini";
const CODEX_TEST_THINKING_OPTION_ID = "low";
function tmpCwd(prefix: string): string {
@@ -18,8 +18,8 @@ function tmpCwd(): string {
return mkdtempSync(path.join(tmpdir(), "daemon-e2e-"));
}
// Use gpt-5.1-codex-mini with low thinking preset for faster test execution
const CODEX_TEST_MODEL = "gpt-5.1-codex-mini";
// Use gpt-5.4-mini with low thinking preset for faster test execution
const CODEX_TEST_MODEL = "gpt-5.4-mini";
const CODEX_TEST_THINKING_OPTION_ID = "low";
describe("daemon E2E", () => {
@@ -18,8 +18,8 @@ function tmpCwd(): string {
return mkdtempSync(path.join(tmpdir(), "daemon-e2e-"));
}
// Use gpt-5.1-codex-mini with low thinking preset for faster test execution
const CODEX_TEST_MODEL = "gpt-5.1-codex-mini";
// Use gpt-5.4-mini with low thinking preset for faster test execution
const CODEX_TEST_MODEL = "gpt-5.4-mini";
const CODEX_TEST_THINKING_OPTION_ID = "low";
describe("daemon E2E", () => {
@@ -174,8 +174,8 @@ function getWorktreeTerminalBootstrapEntries(
return terminals as WorktreeTerminalBootstrapEntry[];
}
// Use gpt-5.1-codex-mini with low thinking preset for faster test execution
const CODEX_TEST_MODEL = "gpt-5.1-codex-mini";
// Use gpt-5.4-mini with low thinking preset for faster test execution
const CODEX_TEST_MODEL = "gpt-5.4-mini";
const CODEX_TEST_THINKING_OPTION_ID = "low";
describe("daemon E2E", () => {
@@ -19,7 +19,7 @@ function tmpCwd(): string {
return mkdtempSync(path.join(tmpdir(), "daemon-e2e-"));
}
const CODEX_TEST_MODEL = "gpt-5.1-codex-mini";
const CODEX_TEST_MODEL = "gpt-5.4-mini";
describe("daemon E2E", () => {
let ctx: DaemonTestContext;
@@ -19,7 +19,7 @@ function tmpCwd(): string {
return mkdtempSync(path.join(tmpdir(), "daemon-e2e-"));
}
const CODEX_TEST_MODEL = "gpt-5.1-codex-mini";
const CODEX_TEST_MODEL = "gpt-5.4-mini";
function isBinaryInstalled(binary: string): boolean {
try {
@@ -18,8 +18,8 @@ function tmpCwd(): string {
return mkdtempSync(path.join(tmpdir(), "daemon-e2e-"));
}
// Use gpt-5.1-codex-mini with low thinking preset for faster test execution
const CODEX_TEST_MODEL = "gpt-5.1-codex-mini";
// Use gpt-5.4-mini with low thinking preset for faster test execution
const CODEX_TEST_MODEL = "gpt-5.4-mini";
const CODEX_TEST_THINKING_OPTION_ID = "low";
describe("daemon E2E", () => {
@@ -19,8 +19,8 @@ function tmpCwd(): string {
return mkdtempSync(path.join(tmpdir(), "daemon-e2e-"));
}
// Use gpt-5.1-codex-mini with low thinking preset for faster test execution
const CODEX_TEST_MODEL = "gpt-5.1-codex-mini";
// Use gpt-5.4-mini with low thinking preset for faster test execution
const CODEX_TEST_MODEL = "gpt-5.4-mini";
const CODEX_TEST_THINKING_OPTION_ID = "low";
type ToolCallItem = Extract<AgentTimelineItem, { type: "tool_call" }>;
@@ -143,7 +143,7 @@ describe("persistence hooks", () => {
config: {
title: "Voice agent (created)",
modeId: "default",
model: "gpt-5.1-codex-mini",
model: "gpt-5.4-mini",
thinkingOptionId: "minimal",
systemPrompt: "Use speak first.",
mcpServers: {
@@ -159,7 +159,7 @@ describe("persistence hooks", () => {
expect(buildConfigOverrides(record)).toMatchObject({
cwd: "/tmp/project",
modeId: "plan",
model: "gpt-5.1-codex-mini",
model: "gpt-5.4-mini",
thinkingOptionId: "minimal",
title: "Voice agent (created)",
systemPrompt: "Use speak first.",
@@ -180,7 +180,7 @@ describe("persistence hooks", () => {
config: {
title: "Creation title",
modeId: "default",
model: "gpt-5.1-codex-mini",
model: "gpt-5.4-mini",
systemPrompt: "Confirm and speak first.",
mcpServers: {
paseo: {
@@ -196,7 +196,7 @@ describe("persistence hooks", () => {
provider: "codex",
cwd: "/tmp/project",
modeId: "plan",
model: "gpt-5.1-codex-mini",
model: "gpt-5.4-mini",
title: "Creation title",
systemPrompt: "Confirm and speak first.",
mcpServers: {
@@ -202,7 +202,7 @@ describe("speech models (download E2E)", () => {
provider: "codex",
cwd: voiceCwd,
modeId: "full-access",
model: "gpt-5.1-codex-mini",
model: "gpt-5.4-mini",
thinkingOptionId: "low",
},
});
@@ -914,8 +914,8 @@ class FakeAgentClient implements AgentClient {
return [
{
provider: this.provider,
id: "gpt-5.1-codex-mini",
label: "gpt-5.1-codex-mini",
id: "gpt-5.4-mini",
label: "gpt-5.4-mini",
isDefault: true,
},
];
@@ -54,7 +54,7 @@ function waitForSignal<T>(
},
voiceLlmProvider: "codex",
voiceLlmProviderExplicit: true,
voiceLlmModel: "gpt-5.1-codex-mini",
voiceLlmModel: "gpt-5.4-mini",
});
}, 120000);
@@ -32,7 +32,7 @@ function getVoiceRoundtripConfig(provider: VoiceRoundtripProvider): {
case "codex":
return {
provider: "codex",
model: "gpt-5.1-codex-mini",
model: "gpt-5.4-mini",
modeId: "full-access",
thinkingOptionId: "low",
};
+1 -1
View File
@@ -214,7 +214,7 @@ paseo terminal kill "$id"
**Codex:**
- `--provider codex/gpt-5.4` — Latest frontier agentic coding model (preferred for all engineering tasks)
- `--provider codex/gpt-5.1-codex-mini` — Cheaper, faster, but less capable
- `--provider codex/gpt-5.4-mini` — Cheaper, faster, but less capable
## Permissions