From 2e6fe2f988028aa36f97d4e0084f94a1be61fa78 Mon Sep 17 00:00:00 2001 From: David Brailovsky Date: Thu, 10 Sep 2026 14:25:55 +0200 Subject: [PATCH] fix(ai): remove retired GPT-5.4 Codex models Remove GPT-5.4 and GPT-5.4 mini from the OpenAI Codex catalog and update affected tests. Fixes #9394 --- packages/ai/CHANGELOG.md | 1 + packages/ai/scripts/generate-models.ts | 24 --------------------- packages/ai/test/deferred-tools.test.ts | 2 +- packages/ai/test/stream.test.ts | 28 ------------------------- packages/ai/test/supports-xhigh.test.ts | 2 +- 5 files changed, 3 insertions(+), 54 deletions(-) diff --git a/packages/ai/CHANGELOG.md b/packages/ai/CHANGELOG.md index a8cc68b22..89c34ee4d 100644 --- a/packages/ai/CHANGELOG.md +++ b/packages/ai/CHANGELOG.md @@ -12,6 +12,7 @@ - Fixed Fireworks unsigned thinking replay and reasoning effort selection using catalog metadata, with verified DeepSeek V4 and Qwen3.8 fallbacks and removal of redundant GLM 5.2 and Kimi K3 effort aliases ([#9323](https://github.com/earendil-works/pi/issues/9323)). - Fixed OpenRouter requests to send `x-session-id` from `sessionId` for Chat Completions and Anthropic Messages models when prompt caching is enabled ([#9102](https://github.com/earendil-works/pi/issues/9102)). - Fixed the DeepSeek catalog to advertise `deepseek-flash` for DeepSeek V4.1 Flash instead of retired Flash aliases, and refreshed DeepSeek pricing metadata ([#9423](https://github.com/earendil-works/pi/issues/9423)). +- Removed GPT-5.4 and GPT-5.4 mini from the OpenAI Codex catalog after they became unavailable to ChatGPT accounts ([#9394](https://github.com/earendil-works/pi/issues/9394)). ## [0.85.1] - 2026-09-05 diff --git a/packages/ai/scripts/generate-models.ts b/packages/ai/scripts/generate-models.ts index 405f2c8e7..7e1bd4f37 100644 --- a/packages/ai/scripts/generate-models.ts +++ b/packages/ai/scripts/generate-models.ts @@ -2793,30 +2793,6 @@ async function generateModels() { contextWindow: CODEX_SPARK_CONTEXT, maxTokens: CODEX_MAX_TOKENS, }, - { - id: "gpt-5.4", - name: "GPT-5.4", - api: "openai-codex-responses", - provider: "openai-codex", - baseUrl: CODEX_BASE_URL, - reasoning: true, - input: ["text", "image"], - cost: withOpenAiLongContextPricing({ input: 2.5, output: 15, cacheRead: 0.25, cacheWrite: 0 }), - contextWindow: CODEX_CONTEXT, - maxTokens: CODEX_MAX_TOKENS, - }, - { - id: "gpt-5.4-mini", - name: "GPT-5.4 mini", - api: "openai-codex-responses", - provider: "openai-codex", - baseUrl: CODEX_BASE_URL, - reasoning: true, - input: ["text", "image"], - cost: { input: 0.75, output: 4.5, cacheRead: 0.075, cacheWrite: 0 }, - contextWindow: CODEX_CONTEXT, - maxTokens: CODEX_MAX_TOKENS, - }, { id: "gpt-5.5", name: "GPT-5.5", diff --git a/packages/ai/test/deferred-tools.test.ts b/packages/ai/test/deferred-tools.test.ts index 455a14b95..52cc741db 100644 --- a/packages/ai/test/deferred-tools.test.ts +++ b/packages/ai/test/deferred-tools.test.ts @@ -497,7 +497,7 @@ describe("deferred tools", () => { makeCodexToken(), ); const toolSearch = await capturePayload( - getModel("openai-codex", "gpt-5.4"), + getModel("openai-codex", "gpt-5.5"), context, makeCodexToken(), ); diff --git a/packages/ai/test/stream.test.ts b/packages/ai/test/stream.test.ts index dca9e2342..8450b52bd 100644 --- a/packages/ai/test/stream.test.ts +++ b/packages/ai/test/stream.test.ts @@ -1428,34 +1428,6 @@ describe("Generate E2E Tests", () => { }); }); - describe("OpenAI Codex Provider (gpt-5.4)", () => { - const llm = getModel("openai-codex", "gpt-5.4"); - - it.skipIf(!openaiCodexToken)("should complete basic text generation", { retry: 3 }, async () => { - await basicTextGeneration(llm, { apiKey: openaiCodexToken }); - }); - - it.skipIf(!openaiCodexToken)("should handle tool calling", { retry: 3 }, async () => { - await handleToolCall(llm, { apiKey: openaiCodexToken }); - }); - - it.skipIf(!openaiCodexToken)("should handle streaming", { retry: 3 }, async () => { - await handleStreaming(llm, { apiKey: openaiCodexToken }); - }); - - it.skipIf(!openaiCodexToken)("should handle thinking", { retry: 3 }, async () => { - await handleThinking(llm, { apiKey: openaiCodexToken, reasoningEffort: "high" }); - }); - - it.skipIf(!openaiCodexToken)("should handle multi-turn with thinking and tools", { retry: 3 }, async () => { - await multiTurn(llm, { apiKey: openaiCodexToken }); - }); - - it.skipIf(!openaiCodexToken)("should handle image input", { retry: 3 }, async () => { - await handleImage(llm, { apiKey: openaiCodexToken }); - }); - }); - describe("OpenAI Codex Provider (gpt-5.5)", () => { const llm = getModel("openai-codex", "gpt-5.5"); diff --git a/packages/ai/test/supports-xhigh.test.ts b/packages/ai/test/supports-xhigh.test.ts index 7be52d6a0..a1e43c40b 100644 --- a/packages/ai/test/supports-xhigh.test.ts +++ b/packages/ai/test/supports-xhigh.test.ts @@ -52,7 +52,7 @@ describe("getSupportedThinkingLevels", () => { expect(getSupportedThinkingLevels(model!)).not.toContain("max"); }); - it.each(["gpt-5.4", "gpt-5.5", "gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-6-astra"] as const)( + it.each(["gpt-5.5", "gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-6-astra"] as const)( "includes xhigh for openai-codex %s models", (modelId) => { const model = getModel("openai-codex", modelId);