fix(ai): update OpenAI Codex model list

This commit is contained in:
Mattia Cerutti
2026-05-17 03:12:19 +02:00
parent 734e08edf8
commit 1af823be9d
16 changed files with 148 additions and 179 deletions

View File

@@ -276,12 +276,12 @@ describe("AI Providers Abort Tests", () => {
describe("OpenAI Codex Provider Abort", () => {
it.skipIf(!openaiCodexToken)("should abort mid-stream", { retry: 3 }, async () => {
const llm = getModel("openai-codex", "gpt-5.2-codex");
const llm = getModel("openai-codex", "gpt-5.5");
await testAbortSignal(llm, { apiKey: openaiCodexToken });
});
it.skipIf(!openaiCodexToken)("should handle immediate abort", { retry: 3 }, async () => {
const llm = getModel("openai-codex", "gpt-5.2-codex");
const llm = getModel("openai-codex", "gpt-5.5");
await testImmediateAbort(llm, { apiKey: openaiCodexToken });
});
});

View File

@@ -228,9 +228,9 @@ describe("Context overflow error handling", () => {
describe("OpenAI Codex (OAuth)", () => {
it.skipIf(!openaiCodexToken)(
"gpt-5.2-codex - should detect overflow via isContextOverflow",
"gpt-5.5 - should detect overflow via isContextOverflow",
async () => {
const model = getModel("openai-codex", "gpt-5.2-codex");
const model = getModel("openai-codex", "gpt-5.5");
const result = await testContextOverflow(model, openaiCodexToken!);
logResult(result);

View File

@@ -67,7 +67,7 @@ const PROVIDER_MODEL_PAIRS: ProviderModelPair[] = [
{ provider: "openai", model: "gpt-5-mini", label: "openai-responses-gpt-5-mini" },
{ provider: "azure-openai-responses", model: "gpt-4o-mini", label: "azure-openai-responses-gpt-4o-mini" },
// OpenAI Codex
{ provider: "openai-codex", model: "gpt-5.2-codex", label: "openai-codex-gpt-5.2-codex" },
{ provider: "openai-codex", model: "gpt-5.5", label: "openai-codex-gpt-5.5" },
// GitHub Copilot
{ provider: "github-copilot", model: "claude-sonnet-4.5", label: "copilot-claude-sonnet-4.5" },
{ provider: "github-copilot", model: "gpt-5.1-codex", label: "copilot-gpt-5.1-codex" },

View File

@@ -704,37 +704,37 @@ describe("AI Providers Empty Message Tests", () => {
describe("OpenAI Codex Provider Empty Messages", () => {
it.skipIf(!openaiCodexToken)(
"gpt-5.2-codex - should handle empty content array",
"gpt-5.5 - should handle empty content array",
{ retry: 3, timeout: 30000 },
async () => {
const llm = getModel("openai-codex", "gpt-5.2-codex");
const llm = getModel("openai-codex", "gpt-5.5");
await testEmptyMessage(llm, { apiKey: openaiCodexToken });
},
);
it.skipIf(!openaiCodexToken)(
"gpt-5.2-codex - should handle empty string content",
"gpt-5.5 - should handle empty string content",
{ retry: 3, timeout: 30000 },
async () => {
const llm = getModel("openai-codex", "gpt-5.2-codex");
const llm = getModel("openai-codex", "gpt-5.5");
await testEmptyStringMessage(llm, { apiKey: openaiCodexToken });
},
);
it.skipIf(!openaiCodexToken)(
"gpt-5.2-codex - should handle whitespace-only content",
"gpt-5.5 - should handle whitespace-only content",
{ retry: 3, timeout: 30000 },
async () => {
const llm = getModel("openai-codex", "gpt-5.2-codex");
const llm = getModel("openai-codex", "gpt-5.5");
await testWhitespaceOnlyMessage(llm, { apiKey: openaiCodexToken });
},
);
it.skipIf(!openaiCodexToken)(
"gpt-5.2-codex - should handle empty assistant message in conversation",
"gpt-5.5 - should handle empty assistant message in conversation",
{ retry: 3, timeout: 30000 },
async () => {
const llm = getModel("openai-codex", "gpt-5.2-codex");
const llm = getModel("openai-codex", "gpt-5.5");
await testEmptyAssistantMessage(llm, { apiKey: openaiCodexToken });
},
);

View File

@@ -481,19 +481,19 @@ describe("Tool Results with Images", () => {
describe("OpenAI Codex Provider", () => {
it.skipIf(!openaiCodexToken)(
"gpt-5.2-codex - should handle tool result with only image",
"gpt-5.5 - should handle tool result with only image",
{ retry: 3, timeout: 30000 },
async () => {
const llm = getModel("openai-codex", "gpt-5.2-codex");
const llm = getModel("openai-codex", "gpt-5.5");
await handleToolWithImageResult(llm, { apiKey: openaiCodexToken });
},
);
it.skipIf(!openaiCodexToken)(
"gpt-5.2-codex - should handle tool result with text and image",
"gpt-5.5 - should handle tool result with text and image",
{ retry: 3, timeout: 30000 },
async () => {
const llm = getModel("openai-codex", "gpt-5.2-codex");
const llm = getModel("openai-codex", "gpt-5.5");
await handleToolWithTextAndImageResult(llm, { apiKey: openaiCodexToken });
},
);

View File

@@ -8,7 +8,7 @@ const codexToken = await resolveApiKey("openai-codex");
describe("openai-codex cache affinity e2e", () => {
it.skipIf(!codexToken)("handles SSE requests with aligned cache-affinity identifiers", async () => {
const model = getModel("openai-codex", "gpt-5.3-codex");
const model = getModel("openai-codex", "gpt-5.5");
const sessionId = "0195d6e4-4cf9-7f44-a2d8-f8f7f49ee9d3";
const context: Context = {
systemPrompt: "You are a helpful assistant. Reply exactly as requested.",

View File

@@ -18,7 +18,7 @@ const usage: Usage = {
describe("OpenAI Responses foreign tool call ID normalization", () => {
it("hashes foreign Copilot tool item IDs into a bounded Codex-safe fc_<hash> shape", () => {
const model = getModel("openai-codex", "gpt-5.3-codex");
const model = getModel("openai-codex", "gpt-5.5");
const assistant: AssistantMessage = {
role: "assistant",
content: [
@@ -31,7 +31,7 @@ describe("OpenAI Responses foreign tool call ID normalization", () => {
],
api: "openai-responses",
provider: "github-copilot",
model: "gpt-5.3-codex",
model: "gpt-5.5",
usage,
stopReason: "toolUse",
timestamp: Date.now() - 2000,

View File

@@ -183,8 +183,8 @@ describe("Responses API tool result images", () => {
);
});
describe("OpenAI Codex Responses Provider (gpt-5.2-codex)", () => {
const model = getModel("openai-codex", "gpt-5.2-codex");
describe("OpenAI Codex Responses Provider (gpt-5.5)", () => {
const model = getModel("openai-codex", "gpt-5.5");
it.skipIf(!openaiCodexToken)(
"should send tool result images in function_call_output",

View File

@@ -114,7 +114,7 @@ describe("responseId E2E Tests", () => {
describe("OpenAI Codex Provider", () => {
it.skipIf(!openaiCodexToken)("should expose responseId", { retry: 3, timeout: 30000 }, async () => {
const llm = getModel("openai-codex", "gpt-5.2-codex");
const llm = getModel("openai-codex", "gpt-5.5");
await expectResponseId(llm, { apiKey: openaiCodexToken });
});
});

View File

@@ -309,10 +309,10 @@ describe("Token Statistics on Abort", () => {
describe("OpenAI Codex Provider", () => {
it.skipIf(!openaiCodexToken)(
"gpt-5.2-codex - should include token stats when aborted mid-stream",
"gpt-5.5 - should include token stats when aborted mid-stream",
{ retry: 3, timeout: 30000 },
async () => {
const llm = getModel("openai-codex", "gpt-5.2-codex");
const llm = getModel("openai-codex", "gpt-5.5");
await testTokensOnAbort(llm, { apiKey: openaiCodexToken });
},
);

View File

@@ -38,7 +38,7 @@ const echoTool: Tool<typeof echoToolSchema> = {
*
* 1. Use github-copilot gpt-5.2-codex to generate a tool call
* 2. Switch to openrouter openai/gpt-5.2-codex and complete
* 3. Switch to openai-codex gpt-5.2-codex and complete
* 3. Switch to openai-codex gpt-5.5 and complete
*
* Both should succeed without "call_id too long" errors.
*/
@@ -117,7 +117,7 @@ describe("Tool Call ID Normalization - Live Handoff", () => {
"github-copilot -> openai-codex should normalize pipe-separated IDs",
async () => {
const copilotModel = getModel("github-copilot", "gpt-5.2-codex");
const codexModel = getModel("openai-codex", "gpt-5.2-codex");
const codexModel = getModel("openai-codex", "gpt-5.5");
// Step 1: Generate tool call with github-copilot
const userMessage: Message = {
@@ -266,7 +266,7 @@ describe("Tool Call ID Normalization - Prefilled Context", () => {
it.skipIf(!codexToken)(
"openai-codex should handle prefilled context with long pipe-separated IDs",
async () => {
const model = getModel("openai-codex", "gpt-5.2-codex");
const model = getModel("openai-codex", "gpt-5.5");
const messages = buildPrefilledMessages();
const response = await completeSimple(

View File

@@ -317,10 +317,10 @@ describe("Tool Call Without Result Tests", () => {
describe("OpenAI Codex Provider", () => {
it.skipIf(!openaiCodexToken)(
"gpt-5.2-codex - should filter out tool calls without corresponding tool results",
"gpt-5.5 - should filter out tool calls without corresponding tool results",
{ retry: 3, timeout: 30000 },
async () => {
const model = getModel("openai-codex", "gpt-5.2-codex");
const model = getModel("openai-codex", "gpt-5.5");
await testToolCallWithoutResult(model, { apiKey: openaiCodexToken });
},
);

View File

@@ -771,10 +771,10 @@ describe("totalTokens field", () => {
describe("OpenAI Codex (OAuth)", () => {
it.skipIf(!openaiCodexToken)(
"gpt-5.2-codex - should return totalTokens equal to sum of components",
"gpt-5.5 - should return totalTokens equal to sum of components",
{ retry: 3, timeout: 60000 },
async () => {
const llm = getModel("openai-codex", "gpt-5.2-codex");
const llm = getModel("openai-codex", "gpt-5.5");
console.log(`\nOpenAI Codex / ${llm.id}:`);
const { first, second } = await testTotalTokensWithCache(llm, { apiKey: openaiCodexToken });

View File

@@ -746,28 +746,28 @@ describe("AI Providers Unicode Surrogate Pair Tests", () => {
describe("OpenAI Codex Provider Unicode Handling", () => {
it.skipIf(!openaiCodexToken)(
"gpt-5.2-codex - should handle emoji in tool results",
"gpt-5.5 - should handle emoji in tool results",
{ retry: 3, timeout: 30000 },
async () => {
const llm = getModel("openai-codex", "gpt-5.2-codex");
const llm = getModel("openai-codex", "gpt-5.5");
await testEmojiInToolResults(llm, { apiKey: openaiCodexToken });
},
);
it.skipIf(!openaiCodexToken)(
"gpt-5.2-codex - should handle real-world LinkedIn comment data with emoji",
"gpt-5.5 - should handle real-world LinkedIn comment data with emoji",
{ retry: 3, timeout: 30000 },
async () => {
const llm = getModel("openai-codex", "gpt-5.2-codex");
const llm = getModel("openai-codex", "gpt-5.5");
await testRealWorldLinkedInData(llm, { apiKey: openaiCodexToken });
},
);
it.skipIf(!openaiCodexToken)(
"gpt-5.2-codex - should handle unpaired high surrogate (0xD83D) in tool results",
"gpt-5.5 - should handle unpaired high surrogate (0xD83D) in tool results",
{ retry: 3, timeout: 30000 },
async () => {
const llm = getModel("openai-codex", "gpt-5.2-codex");
const llm = getModel("openai-codex", "gpt-5.5");
await testUnpairedHighSurrogate(llm, { apiKey: openaiCodexToken });
},
);